Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 53557 invoked from network); 26 Jul 2003 05:51:51 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 26 Jul 2003 05:51:51 -0000 Received: (qmail 14569 invoked by uid 97); 26 Jul 2003 05:54:35 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 14562 invoked from network); 26 Jul 2003 05:54:35 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 26 Jul 2003 05:54:35 -0000 Received: (qmail 52775 invoked by uid 500); 26 Jul 2003 05:51:44 -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 52761 invoked from network); 26 Jul 2003 05:51:44 -0000 Received: from dev1.openload.net (64.208.214.27) by daedalus.apache.org with SMTP; 26 Jul 2003 05:51:44 -0000 Received: from desktop1 (pool-151-198-16-95.mad.east.verizon.net [151.198.16.95]) by dev1.openload.net (8.11.6+Sun/8.9.3) with SMTP id h6Q5oXw18023 for ; Sat, 26 Jul 2003 01:50:37 -0400 (EDT) Message-ID: <069201c3533a$000ce700$6401a8c0@odsmydomain.com> From: "Stephen Ince" To: Subject: Can I get the webapp context path from the init method of a servlet Date: Sat, 26 Jul 2003 01:51:41 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am trying to get the context path from the javax.servlet API for a servlet when it is being initialized (init) and not when it is invoked (not via service, doGet, doPost ..). I know that I can get it from the request.getContextPath() method but this can only be done when the servlet is invoked. public class MyServlet extends HttpServlet { : public void init(ServletConfig config) { super.init(config) // get context path for this servlet } } Steve --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org