The only solution I found so far is the following:
String webAppName = event.getServletContext().getServletContextName();
It simply retrieving the display name element
(<display-name>MyAppName</display-name>) defined in the web.xml file.
I would like to know if anyone has a better idea.
Potentially the display name may be changed and not reflect the actual web
application name.
-----Original Message-----
From: David Delbecq [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 05, 2006 2:19 PM
To: Tomcat Users List
Subject: Re: web app application name
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: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]