9.12. The Complete Filter Deployment Descriptor

The previous sections showed various excerpts of the web.xml file for filtersRus.com. This section shows the file in its entirety.

Listing 9.23. web.xml (Complete version for filter examples)
 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- Order matters in web.xml! For the elements used in this example, this order is required: filter filter-mapping servlet servlet-mapping welcome-file-list --> <!-- Register the name "Reporter" for ReportFilter. --> <filter> <filter-name>Reporter</filter-name> <filter-class> moreservlets.filters.ReportFilter </filter-class> </filter> ...

Get More Servlets and JavaServer Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.