在skinUtil.java中为什么不直接删除cookie!

03-09-03 jini
在skinUtil.java中为什么不直接删除cookie!

public static void deleteCookie(HttpServletRequest request,
            HttpServletResponse response, String cookieName)
    {
        // invalidate the cookie
        Cookie cookie = new Cookie(cookieName, "");
        // delete the cookie when the user closes their web browser
        cookie.setMaxAge(0);
        cookie.setPath("/");
        response.addCookie(cookie);
    }
<p>

猜你喜欢