javax.servlet
Interface Filter


public interface Filter

Filters the request or response to a servlet. Filters will typically call the next filter in the chain, eventually reaching the servlet at the bottom.

Since:
Servlet 2.3

Method Summary
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          doFilter performs the actual work of a filter, either modifying the request or the response.
 FilterConfig getFilterConfig()
          Returns the filter configuration object.
 void setFilterConfig(FilterConfig filterConfig)
          Sets the FilterConfig object.
 

Method Detail

getFilterConfig

public FilterConfig getFilterConfig()
Returns the filter configuration object.

setFilterConfig

public void setFilterConfig(FilterConfig filterConfig)
Sets the FilterConfig object. When the container is done with the filter, it will call setFilterConfig(null)

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws ServletException,
                     java.io.IOException
doFilter performs the actual work of a filter, either modifying the request or the response. It will typically call the chain.doFilter() to invoke the next filter in the chain.
Parameters:
request - the servlet request
response - the servlet response
chain - the next filter in the chain