Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 97137 invoked from network); 6 Dec 2000 05:22:47 -0000 Received: from unknown (HELO elitecore.com) (203.88.135.194) by locus.apache.org with SMTP; 6 Dec 2000 05:22:47 -0000 Received: from elitecore30 (cyberoam.elitecore.com [203.88.135.195]) by elitecore.com (8.10.1/8.10.1) with SMTP id eB6640n28035 for ; Wed, 6 Dec 2000 11:34:00 +0530 (IST) Message-ID: <003201c05f44$b89fd030$50cb09c0@elitecore30> From: "Pratik Machchar" To: References: <20001205121800.22171.qmail@web1102.mail.yahoo.com> <4.3.2.7.2.20001205143651.00af9c58@pop3.demon.co.uk> Subject: Re: Cookie problem max age problem Date: Wed, 6 Dec 2000 10:53:52 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Kief Morris" To: 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