[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - CrossContext jsessionid

jorgemoralespou_2 do-not-reply at jboss.com
Thu Oct 18 13:16:45 EDT 2007


Hi,
I have two applications:
One of them generates a session ID, executes some process, and in some situations, forwards to a jsp in another web application. I do this as a pluggable templating system.  In this JSP I do some things, and return the requested page to the user, but although I do a encodeURL for every link in the page, jsessionid is not introduced in the urls.
Looking at the code, I have seen this (org.apache.catalina.connector.Response), line 1413, method doIsEncodeable(req,res)

  | String contextPath = getContext().getPath();
  | if (contextPath != null) {
  |    String file = url.getFile();
  |    if ((file == null) || !file.startsWith(contextPath))
  |         return (false);
  |    if( file.indexOf(";jsessionid=" + session.getIdInternal()) >= 0 )
  |         return (false);
  | }
  | 

Looking at this code, I assume it is IMPOSSIBLE to encode urls in different contexts.

Is there a way to achieve this? Is this a bug, or expected behaviour?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096676#4096676

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096676



More information about the jboss-user mailing list