Friday, 22 August 2014

Filter interface

public interface Filter {
    public void init(FilterConfig filterConfig) throws ServletException;
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException;
    public void destroy();
}

If you want to define a filter to your application, then you must implement this interface.

Filters perform filtering in the doFilter method. Every Filter has access to a FilterConfig object from which it can obtain its initialization parameters, and a reference to the ServletContext.






Prevoius                                                 Next                                                 Home

No comments:

Post a Comment