Skip to main content

Techdocs Library > White papers >

Adding a servlet filter to all web applications in a server without application change

Document Author:

Don Bagwell

Document ID:


Doc. Organization:

Advanced Technical Sales

Document Revised:


Product(s) covered:

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.




Product Positioning



S/W Pillar(s):



Linux; z/OS


websphere servlet filter

The Techdocs Library
Is this your first visit to Techdocs (the Technical Sales Library)?

Learn more

Techdocs QuickSearch