details.js中cookie的字符问题??

来源:2-11 显示购物车

演绎法5919

2020-03-16 19:53

点开商品后报错

 Servlet.service() for servlet [jsp] in context with path [/ServletCartDemo] threw exception [java.lang.IllegalArgumentException: An invalid character [44] was present in the Cookie value] with root cause

java.lang.IllegalArgumentException: An invalid character [44] was present in the Cookie value

然后上网查是说cookie内容中不能包含逗号“,”,http://img3.mukewang.com/5e6f67a30001472a05280080.jpg

我就将逗号“,”改成了“#”,但是还是会报错http://img4.mukewang.com/5e6f68020001354907390083.jpg

请问怎么解决?


写回答 关注

1回答

JAVA遇见HTML——Servlet篇

本门课程在JSP课程的基础上,深入介绍Servlet的基础知识

160615 学习 · 1029 问题

查看课程

相似问题