code: @Sensitive
      public static void clearCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, Cookie[] cookies) {
          Cookie existing = getCookie(cookies, cookieName);
          if (existing != null) {
              Cookie c = new Cookie(cookieName, "");
  
              String path = existing.getPath();
              if (path == null)
                  path = "/";
              c.setPath(path);
  
              c.setMaxAge(0);
  
              //c.setHttpOnly(existing.isHttpOnly());
              c.setSecure(existing.getSecure());
  
              res.addCookie(c);
          }
  
      }
docs: Invalidate (clear) the cookie in the HttpServletResponse.
  Setting age to 0 to invalidate it.
  
  @param res