Class HttpFilter

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

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(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, jakarta.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
Author:
Various
See Also: