The cookies have to come from the browser.  So, like Sam said below:

You have to set the cookie(s) then send a redirect to the browser giving the
url
to the other site, causing the cookies to get sent to the browser first
(make sure and set the cookies before calling response.sendRedirect()) and
then the browser makes the request
to the other site.

The other site would then have to send a redirect back to your site, causing
the
request to come from the original browser, and therefore returning you the
cookies.

Hope this helps

-Chris Murphy

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


Well, heres my problem.
I have a servlet that takes in a form, parses the data and then
forwards off to another site. Before it posts, it puts the users
ID (encrypted) into a cookie and sets it.
That site then does its little thing and does a HTTP post BACK to my
site.
requesting a file /return.do, which then tries to re-read the cookie.
But it doesnt exist.

How do I get around this?

-----Original Message-----
From: Tingleff, Sam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 31 January 2002 12:44
To: 'Struts Users Mailing List'
Subject: RE: Cookies



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.




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

Reply via email to