code: public static void clearCookie (HttpServletResponse rsp, String name)
      {
          Cookie c = new Cookie(name, "x");
          c.setPath("/");
          c.setMaxAge(0);
          rsp.addCookie(c);
      }
docs: Clear the cookie with the specified name.