First, We have to understand why we are going for servlet filter.
Reason is very simple.
If you want to redirect or Bi -pass each and every request of the web application through one way direction In J2EE based application.
I think you guys are under stand things.
The Java Servlet specification version 2.3 introduces a new component type, called a filter. A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. Filters typically do not themselves create responses, but instead provide universal functions that can be "attached" to any type of servlet or JSP page.