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
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 requestresponse
- the servlet responsechain
- the next filter in the chain