Class HttpFilter

java.lang.Object
javax.servlet.GenericFilter
javax.servlet.http.HttpFilter
All Implemented Interfaces:
Serializable, Filter, FilterConfig

public abstract class HttpFilter extends GenericFilter

Provides an abstract class to be subclassed to create an HTTP filter suitable for a Web site. A subclass of HttpFilter should override doFilter(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.FilterChain).

Filters typically run on multithreaded servers, so be aware that a filter must handle concurrent requests and be careful to synchronize access to shared resources. Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections. See the Java Tutorial on Multithreaded Programming for more information on handling multiple threads in a Java program.

Since:
Servlet 4.0
See Also: