In a clustered Websphere environment, I retrieve the JSESSIONID
of the current HTTP request using the following code:
HttpServletRequest servletRequest = ...;
servletRequest.getSession().getId();
From this code, I get the identifier, something like this: z84d621pxY1VChlK_0eEgFZ
.
Then if I check the cookies on my browser, I see that the JSESSIONID contains the above ID but with additional information, e.g. 0000z84d621pxY1VChlK_0eEgFZ:18fjt9t1u
I'm surprized that HttpServletRequest.getSession().getId()
does not give me the right identifier.
Note that if I test with Tomcat, I always get the same value.
How should I proceed to get the full JSESSIONID
value?