code: public void invalidateCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, boolean enableHttpOnly) {
          Cookie c = new Cookie(cookieName, "");
          if (cookieName.equals("WASReqURL")) {
              c.setPath(getPathName(req));
          } else {
              c.setPath("/");
          }
          c.setMaxAge(0);
          if (enableHttpOnly && webAppSecConfig.getHttpOnlyCookies()) {
              c.setHttpOnly(true);
          }
          if (webAppSecConfig.getSSORequiresSSL()) {
              c.setSecure(true);
          }
          res.addCookie(c);
      }
docs: Invalidate (clear) the referrer URL cookie in the HttpServletResponse.
  Setting age to 0 invalidates it.
  
  @param res