为了账号安全,请及时绑定邮箱和手机立即绑定

代码运行报错

代码运行报错

慕粉13339774096 2016-08-22 17:04:14
HTTP Status 500 - An exception occurred processing JSP page /details.jsp at line 106type Exception reportmessage An exception occurred processing JSP page /details.jsp at line 106description The server encountered an internal error that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: An exception occurred processing JSP page /details.jsp at line 106 103:                   } 104:               } 105:               Cookie cookie = new Cookie("ListViewCookie",list); 106:               response.addCookie(cookie); 107:            108:           %> 109:           <!-- 娴忚杩囩殑鍟嗗搧 --> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)root causejava.lang.IllegalArgumentException: An invalid character [44] was present in the Cookie value org.apache.tomcat.util.http.Rfc6265CookieProcessor.validateCookieValue(Rfc6265CookieProcessor.java:160) org.apache.tomcat.util.http.Rfc6265CookieProcessor.generateHeader(Rfc6265CookieProcessor.java:109) org.apache.catalina.connector.Response.generateCookieString(Response.java:989) org.apache.catalina.connector.Response.addCookie(Response.java:937) org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:386) org.apache.jsp.details_jsp._jspService(details_jsp.java:236) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
查看完整描述

2 回答

?
慕粉13339774096

TA贡献1条经验 获得超1个赞

已解决LIST是个string list;是因为分隔符号逗号引起的,不知道什么原因,不能用逗号,改用"#"就好了

查看完整回答
1 反对 回复 2016-08-22
?
摩诃迦叶

TA贡献146条经验 获得超54个赞


Cookie cookie = new Cookie("ListViewCookie",list);

你往cookie里存了个List?

new Cookie("字符串","字符串"); 不可以是其他的

查看完整回答
反对 回复 2016-08-22
  • 2 回答
  • 0 关注
  • 6463 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信