wood burning stoves 2.0*
The moose likes Servlets and the fly likes Found  Answer on to Delete a Cookie in servlet Request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Found  Answer on to Delete a Cookie in servlet Request" Watch "Found  Answer on to Delete a Cookie in servlet Request" New topic
Author

Found Answer on to Delete a Cookie in servlet Request

craig motell
Greenhorn

Joined: Oct 03, 2008
Posts: 6
I asked how to delete a cookie in a servlet. I was always trying something like:


but cookie would never go away. I would add setDomain, setSecure, etc, etc.

The trick is also to set the value. Why do you need to set a value if you are going to delete a cookie? Uhm,

anyway the following actually deletes a cookie


 
wood burning stoves
 
subject: Found Answer on to Delete a Cookie in servlet Request
 
Similar Threads
setMaxAge(0) doesnt delete cookie?
can we retrieve cookie with JSP added thru servlet
cookies
addCookie()
Delete cookie code is not working in Opera and Mozilla browsers