Tomcat, per the Java EE standard, allows for requests to specify their existing session ID in two ways: 1) via a cookie; 2) via a "path parameter" (not a regular parameter; a path parameter has the format http://host/path/file.ext;jsessionid=xxx?a=b&c=d...
- note the ";" and the fact that the query string only starts AFTER the path parameter). What I WANT is to pass the session ID in the request as a REGULAR param, in the query string after the "?", like http://host/path/file.ext?jsessionid=xxx
.
By the time the request reaches a place where I could intercept it and change the way the container determines session ID (in a Filter or Servlet, e.g.), it's too late. The behavior I want to alter is in the initial processing of the request from the client. What I want to avoid doing is altering Coyote or Tomcat code and rebuilding Tomcat myself, for all of the obvious reasons. What I'd prefer to do is override the appropriate code and config Tomcat to use that code to determine the requested session ID. That doesn't seem to be possible, but I hope I'm wrong.
I know that getting the session ID in this way is nonstandard; I know that using a cookie or a path param are both GREAT ways to track session state; I know that putting the session ID in the actual query string presents potential problems of its own. I need to do it anyway.
Running Tomcat 7, btw.