Session.getId & HttpServletRequest.getRequestedSessionId - Weblogic

This is a discussion on Session.getId & HttpServletRequest.getRequestedSessionId - Weblogic ; Hello, I am trying to get the session ID. If I call Session.getId(), it returns something like: 1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730!1062019579070 But, if I call HttpServletRequest.getRequestedSessionId(), it returns: 1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730 The difference is that the 2nd truncates the bytes after the 2nd ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Session.getId & HttpServletRequest.getRequestedSessionId

  1. Session.getId & HttpServletRequest.getRequestedSessionId


    Hello,

    I am trying to get the session ID.

    If I call Session.getId(), it returns something like:

    1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730!1062019579070

    But, if I call HttpServletRequest.getRequestedSessionId(), it returns:
    1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730

    The difference is that the 2nd truncates the bytes after the 2nd "!".

    So, the question is which one is the valid session ID? I need to save the valid
    session ID as a key of a map into some persistent store, and retrieve it and its
    relevant data from the map if the session is expired.

    Thanks in advance for any help.

    Feng

  2. Re: Session.getId & HttpServletRequest.getRequestedSessionId

    That second number is the 'secondary server' ip address I think.

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic


    "Feng" wrote in message news:3f4d296e$1@newsgroups.bea.com...
    >
    > Hello,
    >
    > I am trying to get the session ID.
    >
    > If I call Session.getId(), it returns something like:
    >
    >

    1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730!10620195790
    70
    >
    > But, if I call HttpServletRequest.getRequestedSessionId(), it returns:
    > 1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730
    >
    > The difference is that the 2nd truncates the bytes after the 2nd "!".
    >
    > So, the question is which one is the valid session ID? I need to save the

    valid
    > session ID as a key of a map into some persistent store, and retrieve it

    and its
    > relevant data from the map if the session is expired.
    >
    > Thanks in advance for any help.
    >
    > Feng




  3. Re: Session.getId & HttpServletRequest.getRequestedSessionId

    It is the session creation time.

    Cameron Purdy wrote:
    > That second number is the 'secondary server' ip address I think.
    >
    > Peace,
    >
    > Cameron Purdy
    > Tangosol, Inc.
    > http://www.tangosol.com/coherence.jsp
    > Tangosol Coherence: Clustered Replicated Cache for Weblogic
    >
    >
    > "Feng" wrote in message news:3f4d296e$1@newsgroups.bea.com...
    >
    >>Hello,
    >>
    >>I am trying to get the session ID.
    >>
    >>If I call Session.getId(), it returns something like:
    >>
    >>

    >
    > 1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730!10620195790
    > 70
    >
    >>But, if I call HttpServletRequest.getRequestedSessionId(), it returns:
    >>1Nh745JQeAT9RZvrgwZTHX10yXEvthxbJ5MPMu9GUzY4rkyyN8 WL!-2084526730
    >>
    >>The difference is that the 2nd truncates the bytes after the 2nd "!".
    >>
    >>So, the question is which one is the valid session ID? I need to save the

    >
    > valid
    >
    >>session ID as a key of a map into some persistent store, and retrieve it

    >
    > and its
    >
    >>relevant data from the map if the session is expired.
    >>
    >>Thanks in advance for any help.
    >>
    >>Feng

    >
    >
    >



    --
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support


+ Reply to Thread