People are always curious as to how to get the various listeners working in a web application. I hear that complaint so often, that I put together a flash, multimedia tutorial to demonstrate just that:
http://www.technicalfacilitation.com/examscam/tf/get.php?link=web This deals with HttpSessionListeners an WebContextListeners, but coding and configuring all of the various Servlet and
JSP API listeners is pretty much the same.
Do make sure there is an entry in your web.xml file:
As far as the class goes, it just has to implement the appropriate listener interfaces:
Here's the ear, which contains a functional war file. It was put together using IBM's Rational Application Developer (IRAD), but the war has been tested and runs fine on
tomcat.
http://www.technicalfacilitation.com/examscam/tf/vangogh/09lifecyclelisteners.ear Cheers!
-Cameron McKenzie