跪求各路大神支招!!!!!!!!!!!!!!!!!!!!!!!!!
An invalid character [44] was present in the Cookie value
cookie中存在无效的字符character [44],查询ASCII码表可知”44”表示逗号
ASCII码表
0010 1100 | 44 | 2C | , |
//list = c.getValue();
list=URLDecoder.decode(c.getValue(), "utf-8"); //解码
// Cookie cookie = new Cookie("ListViewCookie",list);
Cookie cookie=new Cookie("ListViewCookie",URLEncoder.encode(list, "utf-8"));//编码
学会查看并分析记录文件等信息
An invalid character [44] was present in the Cookie value
cookie中存在无效的字符character [44],查询ASCII码表可知”44”表示逗号
首先报的异常是参数非法异常,异常信息是:在cookie值中存在一个无效字符。
所以可以检查下你的list是什么类型的,构造cookie对象时,两个参数必须是字符串。