UserEnvironment userEnvironment = getUserEnvironment(request);
uiRequest.setUserEnvironment(userEnvironment);
UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(controllerId);
AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
.getSpringBean(AuthorizationManager.ID);
if (! authorizationManager.allowed(controller, controllerId, userEnvironment))
{
throw new SecurityException("Controller '" + controllerId + "' not authorized");
}
BeanResponse uiResponse = new BeanResponse();
controller.execute(uiRequest, uiResponse);
createDynaBean(controller, uiResponse, request, response, controllerId);
handleErrors(controller, uiResponse, request, response, controllerId);
String forward = uiResponse.getForward();
if (forward == null)
{
forward = controller.getForward();
if (forward == null)
{
forward = "default";
}