tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Deitcher <...@deitcher.net>
Subject Re: web app application name
Date Wed, 05 Jul 2006 12:25:06 GMT
That won't work in a context listener. Servlet Spec 2.5 includes a
servletContext.getContextPath(), but Tomcat only implements 2.4 (not
sure when the new Tomcat is slated for release).

I struggled with the same thing a few days ago, trying to have log4j
stream to a file named for the context when configured
semi-programmatically. I gave up in the end.

David Delbecq wrote:

> asaf.lahav wrote:
>
>>  
>>
>> How can I obtain the name of the web application name my listener
>> servlet is
>> running under in Java?
>>
>>
>>   
>
> request.getContextPath();
>
> Greetings.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

-- 
______________________________
Avi Deitcher
avi@deitcher.net



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message