public void doFilter ( ServletRequest request , ServletResponse response ) throws ServletException , IOException { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "entry" ) ; try { // if there are no filters, just invoke the requested servlet if ( ! _filtersDefined ) { invokeTarget ( request , response ) ; } else { // increment the filter index _currentFilterIndex ++ ; if ( _currentFilterIndex < _numberOfFilters ) { // more filters to go...invoke the next one FilterInstanceWrapper wrapper = ( ( FilterInstanceWrapper ) _filters . get ( _currentFilterIndex ) ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { //306998.15 logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "executing filter -->" + wrapper . getFilterName ( ) ) ; } wrapper . doFilter ( request , response , this ) ; } else { invokeTarget ( request , response ) ; } } } catch ( UnavailableException e ) { throw e ; } catch ( IOException ioe ) { throw ioe ; } catch ( ServletException e ) { Throwable t = e . getCause ( ) ; if ( t != null && t instanceof FileNotFoundException ) { //don't log a FFDC logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "FileNotFound" ) ; } else { //start 140014 if ( webapp . getDestroyed ( ) != true ) com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( e , "com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter" , "82" , this ) ; else if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "Can not invoke filter because application is destroyed" , e ) ; //end 140014 } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "exit" ) ; throw e ; } catch ( RuntimeException re ) { throw re ; } catch ( Throwable th ) { com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( th , "com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter" , "89" , this ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "exit" ) ; throw new ServletErrorReport ( th ) ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "exit" ) ; }
Causes the next filter in the chain to be invoked or if at the end of the chain causes the requested resource to be invoked