Author: smilek
Date: Tue Feb 27 04:35:14 2007
New Revision: 512235
URL: http://svn.apache.org/viewvc?view=rev&rev=512235
Log:
use PortalSiteRequestContext.getPage().getPath() to obtain correct profiled path
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java?view=diff&rev=512235&r1=512234&r2=512235
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
(original)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
Tue Feb 27 04:35:14 2007
@@ -32,6 +32,8 @@
import org.apache.jetspeed.om.page.Fragment;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
+import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
import org.apache.jetspeed.request.RequestContext;
import org.apache.pluto.om.common.Parameter;
import org.apache.pluto.om.common.ParameterSet;
@@ -93,7 +95,16 @@
}
resultMap.put(STATUS, status);
resultMap.put(PAGE, page);
- resultMap.put(PROFILED_PATH, requestContext.getPath());
+
+ PortalSiteRequestContext siteRequestContext =
(PortalSiteRequestContext)requestContext.getAttribute(ProfilerValveImpl.PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY);
+ if (siteRequestContext == null)
+ {
+ success = false;
+ resultMap.put(REASON, "Missing portal site request context
from ProfilerValve");
+ return success;
+ }
+
+ resultMap.put(PROFILED_PATH,
siteRequestContext.getPage().getPath() ); // requestContext.getPath());
putSecurityInformation(resultMap, page);
String fragments = getActionParameter(requestContext, FRAGMENTS);
if (fragments == null)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]