tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Cookie Rookie - cannot delete session cookie
Date Sat, 02 Jun 2007 00:40:00 GMT

I dont see the attribute 'duration' with either accessor or mutator
the attribute maxAge which when set to -1 will delete the cookie
Take a look at

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Mike Peremsky" <>
To: <>
Sent: Friday, June 01, 2007 9:48 AM
Subject: Cookie Rookie - cannot delete session cookie

>I am pretty new to cookies and am having an issue. I create a cookie in my 
>servlet and write it to the response to last the lifetime of the session 
>(duration = -1). When the user clicks the logout button I find the cookie, 
>reset the duration to 0 then re-add the cookie to the response. But when I 
>look at the browser cookies the cookie is still there and is listed as a 
>cookie lasting the lifetime of the session. From what I read in the API 
>there is nothing to directly remove a cookie from a session, I can only 
>write it with a duration of 0. So, why is the cookie still in the session? 
>How can I get rid of it?
>  TIA
>  - Mike
> ---------------------------------
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center. 

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message