June 17th, 2003, 10:00 PM
Sessions Shared Among Different Browsers?!!
Hi, I'm using Tomcat4.0.6 and "trying" to save information in sessions: ie, session.setAttribute("attrName", someJavaClass) in a servlet to save the info and then retrieve the info later in a .JSP which is "called" by the servlet via sendRedirect( "someJSP" ). Within "someJSP" I try to unpack the data using: session.getAttribute("attrName");
Here's the problem: If two users are connected to the web-application at two different browsers -- BOTH will see the SAME information saved in ONE of the users sessions. Any thoughts on this??
June 21st, 2003, 03:21 AM
First off, make sure you're not just opening two IE windows, since multiple IE windows all share the same session.
Second, Tomcat keeps track of sessions by passing the browser a cookie with the contents of JSESSIONID=(some unique hash). Check your browsers for a cookie from your domain with similar contents. If the numbers are different, everything should be working fine. If the numbers are the same, or the cookies are missing, something's f*cked up .