Getting jsessionid from URL instead of cookie
843841Nov 2 2005 — edited Aug 23 2008I am processing the following request in a servlet: "http://hostname.com/home;jessionid=1111". In addition to being sent in the URL, "jsessionid" is also being sent as a cookie.
In this case, is there a way to get the session id value from the URL instead of the cookie? The method HttpServletRequest.getRequestedSessionId() always returns the cookie value if both mechanisms are used. And the method HttpServletRequest.getRequestURL() returns the url with the jsessioniD stripped (e.g. http://hostname.com/home). If I try a different parameter after the semi-colon (e.g. http://hostname.com/home;myvalue=1111), then HttpServletRequest.getRequestURL() does not strip it off.
Thanks in advance.