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 14:19:14 GMT
Right, that just returns the display-name, not the actual context name.
Wait for Servlet 2.5?

asaf.lahav wrote:

>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
>
>
>  
>

-- 
______________________________
Avi Deitcher
avi@deitcher.net



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