https://issues.apache.org/bugzilla/show_bug.cgi?id=57190
Bug ID: 57190 Summary: ServletContext.getContext(String) cannot return context when using parallel deployments Product: Tomcat 7 Version: 7.0.56 Hardware: Macintosh Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: charles.phill...@performtechnology.com When using ServletContext.getContext(String) in a parallel deployment the context is not returned. For example: foo_a##001 and foo_b##001 are deployed. Page on /foo_a/test.jsp calls ServletContext.getContext("/foo_b"). In non parallel deployments this returns the ServletContext for "/foo_b". However in parallel deployments the ServletContext for "/" is returned instead. This 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. I would expect ServletContext.getContext("/foo_b") to return the current active context for a URL. Instead it looks like it will require to specify the exact version of a context instead such as ServletContext.getContext("/foo_b##001"). This puts the burden of finding the active version of the context on the calling application rather than the underlying servlet container to provide the most current context when ServletContext.getContext(String) is referenced. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org