You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Charles Phillips <ch...@performtechnology.com> on 2014/10/30 20:10:03 UTC

crossContext getContext() for Parrallel Deployments

When trying to forward a request from one context to another getContext() is returning the root context when Parrallel deployments is used in tomcat 7 or 8

For example:
foo_a##001 and foo_b##001 are deployed.
Page on /foo_a/test.jsp calls Servlet.getContext("/foo_b").  In non Parrallel deployments this returns the ServletContext for /foo_b. However in Parrallel deployments the ServletContext for / is returned instead.

His was encountered using a custom filter that is set to forward certain requests to files in one application to a central default application.

CrossContext is set to true for the context.xml.  This works as long as the wars do not use the version name such as foo_b.war instead of foo_b##001.war.

Charles Phillips
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org