Not sure whether this goes here or a different forum, but here goes:
Could someone please tell me how cookies are scoped and managed? I have a web application, implemented with
Tomcat, and in some parts of the application I can get cookies, and in others not. The header HOST value is the same (I've printed it out), so I don't know how to get at these cookies.
What I'm trying to do is implement an autologin type feature. When the user logs on manually (via a page like "http://host.com/login.jsp"), the user is validated via a database lookup in a
servlet and userid/password cookies are stored (by this servlet, with a uri in the
jsp's form like "/appname/ManualLogin"). The login.jsp page populates the form fields (${cookie.userid.value}) from the cookies with no problem. At logon, a user bean is stored. When the user goes to an internal page (like "http://host.com/UserData/userid/home.jsp"), if the user bean is not set, he will be redirected to an autologin servlet (from the jsp page, this is <jsp:forward page="/AutoLogin" />. This servlet attempts to get the userid/password cookies from the request. The autologin servlet does not see the cookies.
Any ideas about what's happening to these cookies and how to get to them from the autologin servlet?
TIA,
anw