users@glassfish.java.net

Re: getServletContextName always returns empty string?

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Oct 2007 10:45:11 PDT

Your context listener's contextInitialized() method should be invoked only once per context, regardless of how many servlets you have declared in your web.xml.

Also, ServletContext.getServletContextName() is supposed to return the context's display-name (as specified in the web.xml), as opposed to the display-name of any of the servlets. I just verified that this works as intended.

Jan
[Message sent by forum member 'jluehe' (jluehe)]

http://forums.java.net/jive/thread.jspa?messageID=239571