Filters and event listeners

Event listeners are classes that implement one or more servlet event listener interfaces. When you deploy a Web application, event listeners are instantiated and registered in the Web container.

A filter transforms the content of HTTP requests, responses, and header information. Filters do not generally create a response or respond to a request, rather they modify requests for a resource, and modify responses from a resource.

See Chapter 3, “Using Filters and Event Listeners” for more information.