I'm wondering if this was by design or if it's a bug.  Running Tomcat 4.1.10
 
I am unable to retrieve the context of another webapp from within the root
context.
 
I've got two contexts setup, one with path="/common", and another with
path="".  From within the context with path="", there is a jsp which
attempts to retrieve the path="/common" context:
 
        servletContext.getContext("/common");
 
Unfortunately, in the
org.apache.catalina.core.ApplicationContext.getContext(String uri) method,
the code always returns the current context whenever the uri passed contains
as it's prefix the path of the current context (context.getPath()).
 
So, given that the root contexts path="", it gets a "/" appended to it, and
that new string is will *always* be the prefix of any uri that is passed
into the getContext(String uri) method, there is no way to ever retrieve a
context for another app from within the root context.
 
So my question is, is that by design, or is it a bug?
 
Thanks,
 
-Ryan
 
---------------------------------------
Ryan Smith
Platform Engineer
Sony Online Entertainment
(858) 577-3072
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
---------------------------------------
 


Reply via email to