Sumeet,
The standard way to replace a cookie is to add a new cookie with the same
path and domain which has the maxAge set to 0 (i.e. expire immediately).
The old
cookie is therefore replaced by the
new cookie which then immediately expires.
-AMT
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of ARORA SUMEET (MSD_MAT)
> Sent: Friday, February 11, 2000 10:56 PM
> To: [EMAIL PROTECTED]
> Subject: Cookies.
> Importance: High
> Sensitivity: Confidential
>
>
> hi list
> I have a couple of doubts wrt cookies. I use tomcat and win/nt
>
> 1.
> I am trying to use multiple cookies for my project.
> However i am finding that the cookie that i am setting last is
> the only one
> getting sent.
> Any particular reason why this is happenning. any solution
> eg. code
>
> Cookie uidCookie = new Cookie("TMX_CUID", uname);
> Cookie sidCookie = new Cookie("TMX_SID", sid);
> Cookie cidCookie = new Cookie("TMX_CUSTCODE", custCode);
>
> response.addCookie(uidCookie);
> response.addCookie(sidCookie);
> response.addCookie(cidCookie);
>
> only cidCookie is what i am able to access later on.
>
>
>
> 2.
> Are there are no methods to remove a cookie.
> All i could find was cookie.setValue();
> I want to remove all these at the time i logout.
> i tried getting the cookie and cookie.setValue(null); but it is not
> happenning. any particular reasons.
> are there better ways of doing this.
>
>
>
> TIA
>
> Sumeet
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html