Responses and requests are intercepted dynamically by a filter so that to transform the information present in responses of requests. However, responses are not typically created by them. For transformation of the response from JSP or Servlet filters are used before it is sent back to client. Reusability gets improved by the filters by placement of the recurring tasks as a reusable unit in the filter.
Better way of thinking servlet filters is to consider steps whose response is sent
Updated 01-15-2012 at 07:37 AM by Servlet