摘要: JAVA操作COOKIE 1.设置Cookie Cookie cookie = new Cookie("key", "value"); cookie.setMaxAge(60); 设置60秒生存期,如果设置为负值的话,则为浏览器进程Cookie(内存中保存),关闭浏览器就失效。 cookie.setPath("/test/test2"); 设置Cookie路径,不设置的话为当前路径(对于Servlet来说为request.getContextPath() + web.xml里配置的该Servlet的url-pattern路径部分... 阅读全文
posted @ 2013-10-30 17:24 孤独青鸟 阅读(1901) 评论(0) 推荐(1) 编辑