1、存入中文:
Cookie c = new Cookie("username", java.net.URLEncoder.encode(name,"utf-8"));
2、取出中文:
java.net.URLDecoder.URLDecoder.decode(c.getValue());
Cookie c = new Cookie("username", java.net.URLEncoder.encode(name,"utf-8"));
java.net.URLDecoder.URLDecoder.decode(c.getValue());