----- Original Message -----
From: "Kief Morris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 05, 2000 8:10 PM
Subject: Re: Cookie problem max age problem


> Pratik Machchar typed the following on 05:57 PM 12/5/2000 +0530
> >I set a cookie with certain maxAge() say 200.
> >now on logout I wan't to remove that cookie I set  maxAge(0) then also
this
> >cookis is not removed
>
> Are you getting the cookie with request.getCookies() and changing its
> maxAge, or creating a new cookie with the same name? I seem to recall
> having a problem with IE when doing it the second way, but doing it
> the first way worked.
>

I tried both the ways same problem continues
Any other solution.


> >Actually when I see that cookie on other page through
request.getCookies();
> >I can get that cookie but when I try to see cookie.getMaxAge() it
returns -1
>
> There's no way for Tomcat to know what the max age was on cookies
> it gets from the request: The Cookie: header in the HTTP request doesn't
> contain this information, it only sends the name and value. The browser
> keeps track of the expiration and simply stops sending the Cookie:
> header after it passes.

    Thanks for clearing above point

> Kief
>
Thanks again
Pratik

Reply via email to