final Session sess = WebManager.getSession(ctx, request);
final WebApp wapp = sess.getWebApp();
final WebAppCtrl wappc = (WebAppCtrl)wapp;
final Object old = I18Ns.setup(sess, request, response,
wapp.getConfiguration().getResponseCharset());
Execution exec = null;
try {
final Desktop desktop = webman.getDesktop(sess, request, response, path, true);
if (desktop == null) //forward or redirect
return;
final RequestInfo ri = new RequestInfoImpl(
wapp, sess, desktop, request,
PageDefinitions.getLocator(wapp, path));
sess.setAttribute(Attributes.GAE_FIX, new Integer(0));
((SessionCtrl)sess).notifyClientRequest(true);
final UiFactory uf = wappc.getUiFactory();
final Richlet richlet = new StandaloneRichlet(comp);
final Page page = WebManager.newPage(uf, ri, richlet, response, path);
exec = new ExecutionImpl(ctx, request, response, desktop, page);
exec.setAttribute(Attributes.PAGE_REDRAW_CONTROL, "page");
exec.setAttribute(Attributes.PAGE_RENDERER, new PageRenderer(exec));
wappc.getUiEngine().execNewPage(exec, richlet, page, out);
//no need to set device type here, since UiEngine will do it later
} finally {
I18Ns.cleanup(request, old);
if (exec != null) {
exec.removeAttribute(Attributes.PAGE_REDRAW_CONTROL);
exec.removeAttribute(Attributes.PAGE_RENDERER);
}
}
}