When you set a cookie it is only a 'suggestion' to the client.  When you
read a cookie it is coming back from the client for the current request.

1. client requests page 1
2. set cookie in first servlet
3. chain to second servlet
  Here you will not see the cookie because the client has yet to see it.
  Any cookies you read will come from from the client prior to step 1.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 5:36 PM
To: [EMAIL PROTECTED]
Subject: Cookies


Hi,
Setting a cookie in a servlet, chaining to another servlet and trying to
read the cookie for
display in a Struts based JSP page.
The first time the cookie is set, when I try and read it, it doesnt
exist.
Second time I set it, the value is set to the first value.
Third time, it has the second value...

Whats going on here? How do I get the current value as opposed to the
previous ones?

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to