A Servlet Filter is an object that transforms the contents of servlet requests and/or responses. The servlet filter must implement the javax.servlet.Filter interface. One example is a filter that applies an XSL/T transformation to XML content that has been generated by a web resource, or applies a given XSL/T transformation to content that will be consumed by a particular JSP or Servlet.