首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

servlet 剔除cookie失败

2012-10-21 
servlet 删除cookie失败RT,在servlet的doget删除cookie时,firefox删除失败,IE和chrome删除成功,现贴上代码

servlet 删除cookie失败
RT,在servlet的doget删除cookie时,firefox删除失败,IE和chrome删除成功,现贴上代码,希望各位大虾指教

Java code
Cookie[] cookies = request.getCookies();        for (Cookie cookie : cookies)        {            cookie.setMaxAge(0);            cookie.setPath("/");            response.addCookie(cookie);        }


[解决办法]
if all other parts of code are correct, i think the reason could be the local setting of your firefox.

please let me known, if you find the solusion. thanks

热点排行