{
Interceptors.doPreIntercept( context, interceptors );
if ( context.hasInterceptorForward() )
{
InterceptorForward fwd = context.getInterceptorForward();
if ( _log.isDebugEnabled() )
{
Interceptor overridingInterceptor = context.getOverridingInterceptor();
StringBuffer msg = new StringBuffer();
msg.append( "Action interceptor " );
msg.append( overridingInterceptor.getClass().getName() );
msg.append( " before action " );
msg.append( actionName );
msg.append( ": forwarding to " );
msg.append( fwd != null ? fwd.getPath() : "null [no forward]" );
_log.debug( msg.toString() );
}
return fwd;
}
}
else
{
PageFlowRequestWrapper.get( request ).setReturningFromActionIntercept( false );
}
//
// Execute the action.
//
RequestInterceptorContext requestContext =
context != null ?
context :
new RequestInterceptorContext( request, response, getServletContext() );
ActionRunner actionExecutor = new ActionRunner( requestContext, action, form, mapping );
ActionForward ret = ActionInterceptors.wrapAction( context, interceptors, actionExecutor );
//
// Run any after-action interceptors.
//
if ( interceptors != null )
{
context.setOriginalForward( ret );
Interceptors.doPostIntercept( context, interceptors );
if ( context.hasInterceptorForward() )
{
InterceptorForward fwd = context.getInterceptorForward();
if ( _log.isDebugEnabled() )
{
_log.debug( "Action interceptor " + context.getOverridingInterceptor().getClass().getName()
+ " after action " + actionName + ": forwarding to "
+ fwd != null ? fwd.getPath() : "null [no forward]" );
}
return fwd;
}
}