/** * 删除Cookie信息。 * @param HttpServletResponse response * * @param HttpServletRequest request * @param String cookieName * @return boolean true:成功;false:失败。 * @see [类、类#方法、类#成员] */ public static boolean deleteCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieDomain) { if ((null != cookieName) && (!"".equals(cookieName))) { Cookie cookie = CookieUtil.getCookies(request, cookieName); cookie.setMaxAge(CookieConstant.COOKIE_AGE_ZERO); cookie.setDomain(cookieDomain); cookie.setPath(CookieConstant.COOKIE_PATH); response.addCookie(cookie); return true; } return false; }