Adding a servlet filter to all web applications in a server without application change
Advanced Technical Sales
WebSphere Application Server
Abstract: The J2EE specification provides a way to configure a servlet filter for a web application. Typically this involves appropriate configuration of the web.xml file contained in the ear file. This document describes how to use the supplied code sample to allow the enabling of a servlet filter for deployed applications without having to update the web.xml file of the application ear file. The approach described allows you to enable a servlet filter for every deployed application or for selected applications. You can also set selective filter mappings on the servlet filter.
As an example of this capability, in the servlet filter that is enabled for applications we show how to use the WAS V7 SMF API to write the query string of a request to the user data area of the SMF 120 subtype 9 record.
We use WebSphere Application Server V7 on z/OS to demonstrate this capability, but it will also work for WAS V7 on any supported operating system.