Hello,
I am using Tomcat 4.1.18 and JDK 1.4.1
I found two problem or bugs:
1) Using Session Listener's sessionDestroyed event I tried to get
the session from HttpSessionEvent and log certain information from the
session, however this throws an IllegalStateException because the
session is already invalid.
Reading the servlet API (10.7 page 73), I think it means that
sessionDestroyed event should be fired before the session is destroyed.
I dunno, might be wrong.
2) Any case, found a work around and I am using
HttpSessionAttributeListener's attributeRemoved which mostly works well,
except that now I have a new problem. I am calling
this.getServletContext() but it it is returning a null if I do it from
init and a null pointer exception in GenericServlet if I do it from
attributeRemoved. Any one know why? Or better yet, if I can work around
it?
Thanks,
Chanan Braunstein
knovel Corp.
Web Development Manager
607-648-4770 x672
http://www.knovel.com