Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 72041 invoked from network); 24 Sep 2002 23:52:20 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Sep 2002 23:52:20 -0000 Received: (qmail 8251 invoked by uid 97); 24 Sep 2002 23:50:33 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 7925 invoked by uid 97); 24 Sep 2002 23:50:25 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 7512 invoked by uid 98); 24 Sep 2002 23:50:17 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <9EAA79BA8878D511B5BD00D0B7B753130540365F@mail-sd.station.sony.com> From: "Smith, Ryan" To: "'tomcat-dev@jakarta.apache.org'" Subject: Unable to Retrieve another Context from within the "root" context (by design, or bug?) Date: Tue, 24 Sep 2002 16:35:10 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C26423.05F91C80" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C26423.05F91C80 Content-Type: text/plain 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 rsmith@soe.sony.com --------------------------------------- ------_=_NextPart_001_01C26423.05F91C80--