Brian Hannan wrote:
> I write jsession into URLs I generate for web pages being served. This
> all works fine and Tomcat detects the session id in the URL.
>
> The only problem is I would like to also grab the jsession ID from the
> URL to detect URLs sent from pages related to a stale session.
>
> I'm unable to see the jsession param. I've tried playing with every
> method in HttpServletRequest, but the jsession id is always missing.
>
> Is there anyway to have Tomcat not strip jsession from a URL?
>
You can ask Tomcat to give you the session id that was requested (whether it is
valid or not) by calling:
request.getRequestedSessionId();
There are other calls to tell you whether the requested session id was actually
valid, and whether it came from a cookie or the request URL. See the servlet
API javadocs on HttpServletRequest for more info.
>
> Thanks for the help.
>
> --
> Brian Hannan
Craig McClanahan