I've created a
Servlet that implements HttpSessionListener and I've overridden the two required methods (see below). All these two overriden methods should do for the moment is write a
string to the log when a session is created or destroyed.
However, I can create multiple sessions, but nothing is being written to the log.
The examples I have seen in books of the HttpSessionListener "register" the listeners in the web.xml file, but I'm implementing this application without a web.xml file (just installing it in the WEB-INF\classes directories). Does this make any difference?
Any ideas why this code isn't correctly binding to the
JSP pages when they create/destory a session?
Thanks much in advance!
-- Mike
//***************************************************
public void sessionCreated(HttpSessionEvent event)
//***************************************************
{
System.out.println("Session Created!");
}
//*****************************************************
public void sessionDestroyed(HttpSessionEvent event)
//*****************************************************
{
System.out.println("Session Destroyed!");
}