You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/11/13 10:51:44 UTC

svn commit: r713694 - /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java

Author: ate
Date: Thu Nov 13 01:51:43 2008
New Revision: 713694

URL: http://svn.apache.org/viewvc?rev=713694&view=rev
Log:
The Pluto implementation (as was used now) breaks when using (only) relative portal urls as it results in a MalformedURLException then.
Needs further investigation, but reverting to the "old" implementation for now.

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java?rev=713694&r1=713693&r2=713694&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ResourceURLProviderImpl.java Thu Nov 13 01:51:43 2008
@@ -44,21 +44,26 @@
     public ResourceURLProviderImpl(RequestContext context,
             PortletWindow portletWindow)
     {
-        this.base = context.getPortalURL().getBaseURL();
+        // this.base = context.getPortalURL().getBaseURL();
     }
 
     public void setAbsoluteURL(String path)
     {
+        // stringUrl = base + path;
         stringUrl = path;
     }
 
     public void setFullPath(String path)
     {
-        stringUrl = base + path;
+        stringUrl = path;
     }
 
     public String toString()
     {
+/*      TODO: review if we actually do need the Pluto solution
+              currently this breaks if using relative paths only
+              as then base == "" resulting in a MalformedURLException
+              
         URL url = null;
 
         if (!"".equals(stringUrl))
@@ -74,6 +79,8 @@
             }
         }
         return ((url == null) ? "" : url.toString());
+*/        
+        return stringUrl;
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org