Arora,
   Why do you insist on setting three separate cookies instead of one cookie
that contains the three values?  You can't set different cookies from the
same URL.  You should just combine the three values into one and set that
value into a single cookie.  Separate the values with a distinguishing
character and use the StringTokenizer to parse the values.

-Richard

============================================================================
====
Richard Yee
DMC1 Corporation
305 W. Evelyn Ave.
Mtn. View, CA. 94041
650-963-3116
[EMAIL PROTECTED]
============================================================================
====


-----Original Message-----
From: ARORA SUMEET (MSD_MAT) [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 14, 2000 7:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies.
Importance: High
Sensitivity: Confidential


thanks arun,

my specific question was that i wanted three cookies to be set in my
application.
i am finding that only the one i am setting the last is going to the client
and that is the only one available to me later on when i read it back.
it is that in tomcat on nt, i am able to set only one cookie.

i have still not overcome the problem of setting three cookies. any help
will be appreciated.
i was able to change the value of the cookie.

-SA



> -----Original Message-----
> From: Arun Thomas [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 15, 2000 3:37 AM
> To:   ARORA SUMEET (MSD_MAT)
> Cc:   JSP Mail List
> Subject:      RE: Cookies.
> Sensitivity:  Confidential
>
> 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

===========================================================================
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

Reply via email to