tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dov Rosenberg <dov.rosenb...@conviveon.com>
Subject SOLVED: How to get the context path for a web application?
Date Tue, 10 Aug 2004 17:23:12 GMT
Someone on the list suggested Request.getContextPath() and it works like a
charm. Thanks to all.



On 8/10/04 1:06 PM, "David Wall" <d.wall@computer.org> wrote:

>> 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
> suggest
>> you check the API docs for more information.
> 
> But do any of those return the context path?  I didn't see it anywhere in
> the javadocs.
> 
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

-- 
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message