tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghuveer" <>
Subject application folder name in webapps folder in tomcat through java servletlistner
Date Wed, 02 Apr 2008 16:07:41 GMT
I have HelloServlet ,HelloServletContextListener in 3 different applications
in tomcat


How to identify in my listner class what is the folder/context name in my

public void contextInitialized(ServletContextEvent ce) {
contextName = ce.getServletContext().getServletContextName();

This code is working only if i have
<display-name>AppHello1</display-name> in web.xml.
If there is no <display-name> in web.xml then above code in listner class is
returning null.

Is there facility to know application folder name in webapps folder in


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