public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {Cookie cookie=new Cookie("username","大牛");cookie.setMaxAge(30*60);response.addCookie(cookie);RequestDispatcher view=request.getRequestDispatcher("/WEB-INF/main/cookieresult.jsp");view.forward(request, response);这是发送cookie的代码 一运行汤姆猫就报错 说是cookie不能有中文 怎么办?
- 2 回答
- 0 关注
- 623 浏览
添加回答
举报
0/150
提交
取消