As of Servlet Specification 2.3 (which you can download at http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html), the Tomcat server supports filters. Here are today's topics:
Creating a simple filter that prints to the server console
Logging user access data
Using a filter's initialization parameters
Restricting access to a Web resource to particular times of the day
Inserting text into the response from a filter
Enforcing user authentication with filters
Filters are much like add-ons for your Web resources, such as JSP pages and servlets. You can use filters as a gateway for those ...