Persistent Cookie - problem

I am using Jigsaw to build a servlet-based online purchasing system demo,
and have run into a problem using Cookies.  The problem is that I have not
been able to make them persistent.  My first servlet creates the Cookie with
name and value, calls setMaxAge(3600000), and adds the cookie to the
Response object.  My second servlet reads all cookies with
request.getCookies(), but is not able to find the cookie.  Let me amend that
- the second servlet WILL be able to find the cookie if the browser has not
been closed, but WILL NOT if the browser has been closed.  Any ideas what I
am doing wrong here?  If you have sample code that would show how I can
create a persistent cookie in one servlet which is added to response, then
access that cookie from another servlet by reading the request, that would
be most helpful.  Thanks from a servlet beginner...

Greg Ackerman

Received on Friday, 26 March 1999 13:12:15 UTC