Forums Register Login

Found Answer on to Delete a Cookie in servlet Request

1
+Pie Number of slices to send: Send
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


To do a great right, do a little wrong - shakepeare. twisted little ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2141 times.
Similar Threads
addCookie()
cookies
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
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:33:01.