0

Below is an instance of JSESSIONID stored in cookie. This JSESSIONID was generated by Websphere.

0000SHOQmBQ8EokAQtzl_HYdxIt:vuel491u

I know from this article page 1011 that the JESSSION id consists of the following 4 part: Cache ID, Session ID , separator(the [:]), and Clone ID / Partition ID

My question 1 is: how to extract the Session ID part?

Knowing the separator is always [:], I can get the first 2 parts. What I am not sure is: Does Cache ID always exist and is it always 4 digit? Is the length of session id always the same = 23 digits?

Is there any client side API to get session ID from JSESSIONID in cookie?

Question 2: In most of my client environment, the CacheID is always 0000, but in some other client environment, the CacheID is always 0001. I want to know, what made this difference?

Information I gathered since this post:

The WebSphere property HttpSessionIdLength defines length of Session ID and the default is 23. But Client side logic can not get this value and can not assume it is always 23. Since I am still not sure Cache Id is 4 digit, I am still searching for a solution..

2
  • Any reasons for getting sessionID on the client side?
    – Gas
    Commented Dec 7, 2023 at 13:05
  • 1
    Check this post stackoverflow.com/a/25149954/3701228 Client API depends on you implementation. In general if you'll take JSESSIONID cookie, the first 4 didigs are cache/epoch ID, then you have session ID till ":" and then cloneid/partitionID. So just take chars from 4 till ":".
    – Gas
    Commented Dec 7, 2023 at 13:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.