An application can be interacted through three objects—the Servlet Context, Request and Session objects. Any change in state of an object is manifested as an event which is handled through listeners. In general, a listener is something that will alert the program, on the occurrence of an event. Conceptually, it is similar to the click of a button or moving the mouse as interjected by a VB program. In this context, there are a few events that are applicable. In the case of a session, it can be tracked through certain events in its lifetime. These events can be trapped and the callback function executed. It helps the system do specific tasks like session or request logging or setting up database operations during initialization ...

Get Web Technology: Theory and Practice now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.