String actionName = InternalUtils.getActionName( mapping );
//
// Check whether isLoginRequired=true for this action.
//
LoginHandler loginHandler = Handlers.get( getServletContext() ).getLoginHandler();
if ( pfActionMapping != null && pfActionMapping.isLoginRequired()
&& loginHandler.getUserPrincipal( getHandlerContext() ) == null )
{
NotLoggedInException ex = createNotLoggedInException( actionName, request );
return handleException( ex, mapping, form, request, response );
}