You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "dB." <db...@dblock.org> on 2010/06/18 20:45:15 UTC
How can I fetch the web application (context) at runtime?
I am trying to write a log4j appender that can put the application name in the log filename (I want a log per web application, without knowing the names of all the web applications upfront).
Is there a way to access the context / container / some variable that can give me the name of the web application (or something else unique per web application) at runtime from a far-reaching piece of code? I'd be happy with a solution that works only with a specific version of Tomcat (6).
Thx
dB.
dB. @ dblock.org<http://www.dblock.org/>
Moscow|Geneva|Seattle|New York
Re: How can I fetch the web application (context) at runtime?
Posted by Mark Thomas <ma...@apache.org>.
On 18/06/2010 19:45, dB. wrote:
> I am trying to write a log4j appender that can put the application name in the log filename (I want a log per web application, without knowing the names of all the web applications upfront).
>
> Is there a way to access the context / container / some variable that can give me the name of the web application (or something else unique per web application) at runtime from a far-reaching piece of code? I'd be happy with a solution that works only with a specific version of Tomcat (6).
That would be a question for the users list.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org