tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "asaf.lahav" <asaf.la...@gmail.com>
Subject RE: web app application name
Date Wed, 05 Jul 2006 15:13:08 GMT
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:delbd@oma.be] 
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: users@tomcat.apache.org

To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

For additional commands, e-mail: users-help@tomcat.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message