You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by wo...@apache.org on 2009/03/30 14:44:35 UTC
svn commit: r759947 -
/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
Author: woonsan
Date: Mon Mar 30 12:44:34 2009
New Revision: 759947
URL: http://svn.apache.org/viewvc?rev=759947&view=rev
Log:
PLUTO-543: PortletRequestImpl needs to decide its contextPath on demand.
Moves the decision logic to the getter method.
Modified:
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java?rev=759947&r1=759946&r2=759947&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java Mon Mar 30 12:44:34 2009
@@ -100,16 +100,15 @@
private Profile ccppProfile = null;
- private final String lifecyclePhase;
+ private String contextPath;
- private final String contextPath;
+ private final String lifecyclePhase;
public PortletRequestImpl(PortletRequestContext requestContext, PortletResponseContext responseContext, String lifecyclePhase)
{
this.requestContext = requestContext;
this.responseContext = responseContext;
this.lifecyclePhase = lifecyclePhase;
- this.contextPath = requestContext.getPortletWindow().getPortletEntity().getPortletDefinition().getApplication().getContextPath();
this.portalContext = getPortletContainer().getRequiredContainerServices().getPortalContext();
}
@@ -317,6 +316,11 @@
public String getContextPath()
{
+ if (contextPath == null)
+ {
+ contextPath = requestContext.getPortletWindow().getPortletEntity().getPortletDefinition().getApplication().getContextPath();
+ }
+
return contextPath;
}