This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Found Answer on to Delete a Cookie in servlet Request
 
Similar Threads
setMaxAge(0) doesnt delete cookie?
Delete cookie code is not working in Opera and Mozilla browsers
can we retrieve cookie with JSP added thru servlet
cookies
addCookie()