}
@Override
protected Template handleRequest( @NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Context ctx ) throws Exception {
HttpSession session = request.getSession();
SessionContext sessionContext = getSessionContext( session );
refreshSessionContext( sessionContext );
checkSecurity( sessionContext );
ctx.put( SESSION_CONTEXT, sessionContext );
ctx.remove( FORMATTER );
ctx.put( FORMATTER, new XoreVelocityFormatter( ctx, request, response, sessionContext ) );
try {
//Diese Methode wird in der Sub-Klasse implementiert.
handle( request, response, ctx, session, sessionContext );
} catch ( XoreException e ) {
postProcessingContext( request, response, ctx );
ctx.put( EXCEPTION, e );
ctx.put( CONTENT_TEMPLATE_NAME, "error.vm" );
return getLayoutTemplate();
}
ctx.put( CONTENT_TEMPLATE_NAME, getContentTemplateName( request ) );
postProcessingContext( request, response, ctx );
if ( redirectUrl( request ) ) {
response.sendRedirect( response.encodeRedirectURL( sessionContext.getRoot() + '/' + getRedirectUrl( request ) ) );
}
return getLayoutTemplate();
}