Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 21068 invoked from network); 25 Feb 2006 15:27:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Feb 2006 15:27:26 -0000 Received: (qmail 97331 invoked by uid 500); 25 Feb 2006 15:27:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 97310 invoked by uid 500); 25 Feb 2006 15:27:07 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 97299 invoked by uid 99); 25 Feb 2006 15:27:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Feb 2006 07:27:07 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mikolajr@becomo.com designates 213.17.131.34 as permitted sender) Received: from [213.17.131.34] (HELO biuro.becomo.com) (213.17.131.34) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Feb 2006 07:27:02 -0800 Received: by biuro.becomo.com (Postfix, from userid 510) id 3567369D04; Sat, 25 Feb 2006 16:26:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by biuro.becomo.com (Postfix) with ESMTP id 2F50269B25 for ; Sat, 25 Feb 2006 16:26:06 +0100 (CET) Date: Sat, 25 Feb 2006 16:26:06 +0100 (CET) From: Mikolaj Rydzewski Reply-To: mikolajr@becomo.com To: users@tomcat.apache.org Subject: How to determine application's context path? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Is there any way to determine application's context path without need for the first request? I'd like to setup some monitoring stuff (MBeans) during app initialization (ServletContextListener). And it seems that contextPath is available _only_ as a part of HttpServletRequest. Sure I could use init parameters or something similiar, but it's not a solution for me. It's very likely there will be several same webapps deployed on single tomcat and I have to able distinguish between MBeans. -- Mikolaj Rydzewski Becomo SA --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org