ApplicationFactory appFactory =
(ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
Application application = appFactory.getApplication();
ViewHandler viewHandler = application.getViewHandler();
FacesContext facesContext = facesContext(request, response);
UIViewRoot view = viewHandler.createView(facesContext, selectDefaultView(request, response));
facesContext.setViewRoot(view);
lifecycle.render(facesContext);
}
private String selectDefaultView(RenderRequest request, RenderResponse response) throws PortletException