读书人

servlet 剔除cookie失败

发布时间: 2012-10-21 09:00:07 作者: rapoo

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

读书人网 >J2EE开发

热点推荐