B.3. javax.servlet

This package contains classes and interfaces required for writing servlets. This package includes the Servlet interface, which is implemented by all servlets.

B.3.1. javax.servlet Interfaces

B.3.1.1. Filter

A filter object performs filtering on requests and resources. It can also filter the response from a resource. The Filter interface has three methods. Every Filter object has access to a FilterConfig object for receiving initialization parameters.

public void init(FilterConfig filterConfig) 
throws ServletException

init() is called by the Web container when the filter is instantiated. It is passed to a FilterConfig object containing configuration information about the filter's environment.

public void destroy() 

destroy() ...

Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.