RE: How to get the context path for a web application?

2004-08-10 Thread Shapira, Yoav
Hi, getServletContextName requires that you define it in your web.xml, and doesn't need to correspond to the path attribute of the Context element, so don't count on that. Yoav Shapira Millennium Research Informatics -Original Message- From: Dov Rosenberg [mailto:[EMAIL PROTECTED]

Re: How to get the context path for a web application?

2004-08-10 Thread David Wall
request.getContextPath(); Is there a way to do it when not serving a web page? Like in a startup servlet that has a ServletConfig/Context, but doesn't have a request? This way, the context could be retrieved once and cached and used in situations unrelated to processing a specific HTTP

RE: How to get the context path for a web application?

2004-08-10 Thread Robert Harper
A ServletConfig reference is passed in the call to the init() method of your servlet. From this you may use the getServletContext() method to get the context. One thing to remember is that this does not get called until the servlet is initialized and would be invalidated when it is destroyed. I

Re: How to get the context path for a web application?

2004-08-10 Thread David Wall
A ServletConfig reference is passed in the call to the init() method of your servlet. From this you may use the getServletContext() method to get the context. One thing to remember is that this does not get called until the servlet is initialized and would be invalidated when it is destroyed.

RE: How to get the context path for a web application?

2004-08-09 Thread Keith Bottner
Have you tried ? request.getServletPath(); Keith -Original Message- From: Dov Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 9:49 PM To: Tomcat Users List Subject: How to get the context path for a web application? I need to find a way to get the context path of

RE: How to get the context path for a web application?

2004-08-09 Thread Aris Javier
also, request.getContextPath(); aris -Original Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:10 PM To: 'Tomcat Users List' Subject: RE: How to get the context path for a web application? Have you tried ? request.getServletPath(); Keith