日期:2014-05-19  浏览次数:20633 次

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