getServletContextName returns NULL in a filter ??
843841Jan 12 2004 — edited Feb 7 2005I have set a context for this web app in its xml file in the conf/Catalina/Locahost folder of tomcat 5.0.16
However, when trying to get the context name when in a filter, I get null. Can anyone explain why. The code is below:-
public void attributeAdded(HttpSessionBindingEvent event)
{
HttpSession session = event.getSession();
String contextname = session.getServletContext().getServletContextName();
Is this because I have the jar file containing this in my common/lib folder, even though I am accessing it via a webapp context ?