public void processAction ( ) throws IOException { if ( isDisposed ( ) ) { LOG . error ( "Skipping action phase. Attempt to reuse disposed ContainerHelper instance" ) ; return ; } try { // Check user context has been prepared if ( getNewConversation ( ) == null ) { throw new IllegalStateException ( "User context has not been prepared before the action phase" ) ; } prepareAction ( ) ; UIContext uic = getUIContext ( ) ; if ( uic == null ) { throw new IllegalStateException ( "No user context set for the action phase." ) ; } UIContextHolder . pushContext ( uic ) ; // Make sure maps are cleared up uic . clearScratchMap ( ) ; uic . clearRequestScratchMap ( ) ; prepareRequest ( ) ; Request req = getRequest ( ) ; getInterceptor ( ) . attachResponse ( getResponse ( ) ) ; getInterceptor ( ) . serviceRequest ( req ) ; if ( req . isLogout ( ) ) { handleLogout ( ) ; dispose ( ) ; } } catch ( ActionEscape esc ) { LOG . debug ( "ActionEscape performed." ) ; // Action escapes must be handled in the action phase and then // do nothing if they reach the render phase (which they will in // the servlet implementation) handleEscape ( esc ) ; dispose ( ) ; } catch ( Escape esc ) { LOG . debug ( "Escape performed during action phase." ) ; // We can't handle the escape until the render phase. } catch ( Throwable t ) { // We try not to let any exception propagate to container. String message = "Caught exception during action phase." ; LOG . error ( message , t ) ; // We can't handle the error until the render phase. propogateError ( t ) ; } finally { UIContextHolder . reset ( ) ; } }
Support standard processing of the action phase of a request .