You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by so...@apache.org on 2007/12/06 20:39:55 UTC
svn commit: r601828 -
/myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java
Author: sobryan
Date: Thu Dec 6 11:39:54 2007
New Revision: 601828
URL: http://svn.apache.org/viewvc?rev=601828&view=rev
Log:
PORTLETBRIDGE-19: PortletExternalContextImpl.encodeResourceURL seems to
return prepend the context path twice
Thank's Kito and Michael for diagnosing and fixing this issue.
Modified:
myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java
Modified: myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java?rev=601828&r1=601827&r2=601828&view=diff
==============================================================================
--- myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java (original)
+++ myfaces/portlet-bridge/trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java Thu Dec 6 11:39:54 2007
@@ -433,7 +433,11 @@
// prepend the context path since portletResponse.encodeURL() requires a full path URI
// Don't need to check return from getRequestContextPath because there must
// always be a vlaue even if an empty string
- s = getRequestContextPath() + s;
+ String ctxPath = getRequestContextPath();
+ if (ctxPath.length() > 0 && !s.startsWith(ctxPath))
+ {
+ s = ctxPath + s;
+ }
String resourceURLStr = mPortletResponse.encodeURL(s);