dcsimg

How do I delete a cookie set by a servlet?

John Mitchell

Get the cookie from the request object and use setMaxAge(0) and then add the cookie to the response object.

See also How can I delete a cookie from within a JSP page?