You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Remijan <Mi...@solocup.com> on 2002/08/27 21:26:52 UTC

how to delete a cookie?????

...

I'm testing the use of cookies by basically setting up a jsp page in two different contexts and flipping back and forth between them.  I've tried to delete the cookie by calling setMaxAge() with -1, 0, and 1 but i've not been able to been able to successfully delete the cookie, i.e when i flip to the other context i get my "found cookie" message instead of the "cookie missing, adding a new one" message.  Anyone been able to successfully delete a cookie?

<mike/>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: how to delete a cookie?????

Posted by Milt Epstein <me...@uiuc.edu>.
On Tue, 27 Aug 2002, Michael Remijan wrote:

> ...
>
> I'm testing the use of cookies by basically setting up a jsp page in
> two different contexts and flipping back and forth between them.
> I've tried to delete the cookie by calling setMaxAge() with -1, 0,
> and 1 but i've not been able to been able to successfully delete the
> cookie, i.e when i flip to the other context i get my "found cookie"
> message instead of the "cookie missing, adding a new one" message.
> Anyone been able to successfully delete a cookie?

You don't specify fully what you're doing to delete the cookie.
Remember, after you set up the cookie (BTW, max age of 0 should delete
it), you need to add the cookie to the response.  Changing the cookie
in the request alone and/or not adding it to the response won't do
anything.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>