public void execute(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (!initialized) { throw new IllegalStateException( "Filter "+getName()+" have not been initialized, could'n execute request"); } log.finest("Request '"+request+"' executes by the '"+getName()+"' filter"); FilterChain chain = new FilterChain() { // Execute next object in the chain. public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { next.execute(request, response); } }; filter.doFilter(request, response, chain); }
public void execute(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (!initialized) { throw new IllegalStateException( "Filter "+getName()+" have not been initialized, could'n execute request"); } log.finest("Request '"+request+"' executes by the '"+getName()+"' filter"); FilterChain chain = new FilterChain() { // Execute next object in the chain. public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { next.execute(request, response); } }; filter.doFilter(request, response, chain); }