tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smith, Ryan" <>
Subject Unable to Retrieve another Context from within the "root" context (by design, or bug?)
Date Tue, 24 Sep 2002 23:35:10 GMT
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
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:
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?
Ryan Smith
Platform Engineer
Sony Online Entertainment
(858) 577-3072 <> 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message