Results 1 to 7 of 7
  1. #1
    lisa.lipsky is offline Member
    Join Date
    Jul 2009
    Posts
    8
    Rep Power
    0

    Default problem with sessions

    I've encountered a slight problem with sessions..

    When my colleague runs his page on his PC, the sessions are working fine but when it comes to my PC, my session IDs are different which results in me not being able to retrieve the session attributes.

    Any ideas why?

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Different sessions do not share the same session atributes. Session attributes are stored in the .... session. So different sessions will have different session attributes.

  3. #3
    lisa.lipsky is offline Member
    Join Date
    Jul 2009
    Posts
    8
    Rep Power
    0

    Default

    I'm sorry I don't get you.

    I have two jsp files and one of them is in a popup form.
    What I'm trying to say is when these files are executed in machine A, the sessions work fine but when executed in machine B, the sessions do not work.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    You'll need to be specific about what you mean by "the sessions do not work".

  5. #5
    lisa.lipsky is offline Member
    Join Date
    Jul 2009
    Posts
    8
    Rep Power
    0

    Default

    Let's see.

    In abc.jsp, there's a link that calls xyz.jsp as a popup.

    In xyz.jsp, there'll be
    session.setAttribute("sesID", session.getId());

    And in abc.jsp, there'll be
    session.getAttribute("sesID", session.getId());

    In my case, these two IDs are different while running on my PC otherwise they are
    the same running on other PCs.

    What I would like to know is the reason behind this scenario.

    Thanks.

  6. #6
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    session.getAttribute("sesID", session.getId());
    How come getAttribute taking two arguments?

    : Interface HttpSession)

  7. #7
    lisa.lipsky is offline Member
    Join Date
    Jul 2009
    Posts
    8
    Rep Power
    0

    Default

    Sorry, that was my typo.

    It's session.getAttribute("sesID");

Similar Threads

  1. java sessions
    By Raghuvasa in forum Advanced Java
    Replies: 2
    Last Post: 12-10-2008, 06:40 AM
  2. Http Sessions
    By manasa in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-29-2008, 10:51 AM
  3. Sessions in jsp
    By Ed in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 03:46 PM
  4. sessions in jsp
    By Heather in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-30-2007, 03:44 PM
  5. Sessions and logout question
    By orchid in forum Web Frameworks
    Replies: 1
    Last Post: 05-18-2007, 06:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •