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

为什么只一行一直报错啊!!!

为什么只一行一直报错啊!!!

qq_不笑猫_2 2016-07-28 01:16:29
org.apache.jasper.JasperException: An exception occurred processing JSP page /details.jsp at line 101 98:               99:               Cookie cookie = new Cookie("ListViewCookies",list); 100:              // System.out.println(list); 101:               response.addCookie(cookie); 102:            103:           %> 104:           <!-- 娴忚杩囩殑鍟嗗搧 --> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:588) 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:53)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:384) org.apache.jsp.details_jsp._jspService(details_jsp.java:231) 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) 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:53)note The full stack trace of the root cause is available in the Apache Tomcat/9.0.0.M9 logs.
查看完整描述

1 回答

?
qq_不笑猫_2

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

知道了。。Tomcat9 cookie中的String似乎是不支持“,”和“#”等一些符号的,试了下,先清楚cooklie用0分割就好了。。

查看完整回答
反对 回复 2016-07-28
  • 1 回答
  • 0 关注
  • 5110 浏览

添加回答

举报

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