严重: Servlet.service() for servlet [jsp] in context with path [/JspViewListDemo] threw exception [An exception occurred processing [details.jsp] at line [70]
67: }68: }
69: Cookie cookie = new Cookie("ListViewCookie",list);
70: response.addCookie(cookie);
71:
72: %>
73: <!-- 浏览过的商品 -->
Stacktrace:] with root cause
java.lang.IllegalArgumentException: An invalid character [44] was present in the Cookie value
http://idcbgp.cn/qadetail/177191
list+=request.getParameter("id")+"#";
//如果浏览记录超过1000条,清零.
String[] arr = list.split("#");
if(arr!=null&&arr.length>0)
{
if(arr.length>=1000)
{
list="";
}
}
Cookie cookie = new Cookie("ListViewCookie",list);
response.addCookie(cookie);
将逗号,换成#,记得itemdao的方法也是
點擊查看更多內(nèi)容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優(yōu)質文章
正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦