#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    1
    Rep Power
    0

    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??

    Thanks!
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    15
    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 .
    -james

IMN logo majestic logo threadwatch logo seochat tools logo