tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ward <david.w...@dotech.com>
Subject Re: get Servlet Context Name
Date Tue, 02 Oct 2001 01:41:52 GMT
request.getContextPath() works in both servlets and JSP's (as JSP's are 
servlets).  I don't suggest ever hardcoding anything to use specific 
container's (including tomcat's) API's.  Keep to the spec.

Hope this helps,
David

--

chiuming wrote:

> hi,
> any way I can get a servlet context ( web application
> )'s name with in a servlet?  on Servlet API 2.2 (not
> Servlet 2.3)
> 
> -OR- there is no way to do that?
> 
> P.S. I am using tomcat... may I access internal tomcat
> object to achieve that?
> 
> thanks
> 
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com

 >


Mime
View raw message