portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r758828 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
Date Thu, 26 Mar 2009 20:11:05 GMT
Author: ate
Date: Thu Mar 26 20:11:04 2009
New Revision: 758828

URL: http://svn.apache.org/viewvc?rev=758828&view=rev
Log:
Use the current portal contextPath for for new local portlet apps

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=758828&r1=758827&r2=758828&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
Thu Mar 26 20:11:04 2009
@@ -60,6 +60,8 @@
     protected PermissionManager     permissionManager;
     protected boolean               autoCreateRoles;
     protected List<String>          permissionRoles;
+    protected String                portalContextPath;
+    
     protected int  descriptorChangeMonitorInterval = DEFAULT_DESCRIPTOR_CHANGE_MONITOR_INTERVAL;
     /**
      * holds the max number of retries in case of unsuccessful PA start
@@ -89,8 +91,14 @@
         this.nodeManager		= nodeManager;
         this.appRoot            = appRoot;
         this.descriptorService  = descriptorService;
+        portalContextPath  = appRoot.replace('\\','/');
+        if (portalContextPath.endsWith("/"))
+        {
+            portalContextPath = portalContextPath.substring(0, portalContextPath.length()-1
);
+        }
+        portalContextPath = portalContextPath.substring(portalContextPath.lastIndexOf('/'));
 	}
-    
+	
     public void start()
     {
         if ( descriptorChangeMonitorInterval > 0 )
@@ -157,7 +165,7 @@
 		throws RegistryException
 	{
         checkStarted();
-        startPA(contextName, "/"+contextName, warStruct, paClassLoader, PortletApplication.LOCAL);
+        startPA(contextName, portalContextPath, warStruct, paClassLoader, PortletApplication.LOCAL);
 	}
 
 	public void startPortletApplication(String contextName, FileSystemHelper warStruct,
@@ -295,11 +303,6 @@
 			{
 			    pa.setRevision(revision);
 			}
-
-			if (paType == PortletApplication.LOCAL)
-			{
-				pa.setContextPath("<portal>");
-			}
 		}
 		catch (Exception e)
 		{



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


Mime
View raw message