locators = new HashMap();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
}
PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)getSessionAttribute(ProfilerValveImpl.PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
String userPrincipal = ((getUserPrincipal() != null) ? getUserPrincipal().getName() : null);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, userPrincipal, true, true);
BaseFragmentsElement managedPageOrTemplate = requestContext.getManagedPageOrTemplate();
PageTemplate managedPageTemplate = requestContext.getManagedPageTemplate();
Map managedFragmentDefinitions = requestContext.getManagedFragmentDefinitions();
ContentPage cpage = pageLayoutComponent.newContentPage(managedPageOrTemplate, managedPageTemplate, managedFragmentDefinitions);
//System.out.println("page is " + cpage.getPath());
this.setPage(realPage);
this.setPath(pathSave);
return cpage;