portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 46971 - in portals/pluto/trunk: . portal/src/java/org/apache/pluto/portalImpl/om/portlet/impl portal/src/java/org/apache/pluto/portalImpl/om/servlet/impl portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry
Date Tue, 21 Sep 2004 07:50:43 GMT
Author: cziegeler
Date: Tue Sep 21 00:50:43 2004
New Revision: 46971

Removed:
   portals/pluto/trunk/.cvsignore
Modified:
   portals/pluto/trunk/.classpath
   portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/portlet/impl/PortletApplicationDefinitionImpl.java
   portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/servlet/impl/WebApplicationDefinitionImpl.java
   portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
Log:
Apply patch for IBM WebSphere partially; submitted by Stefan Kiskovac as Issue Pluto-52

Modified: portals/pluto/trunk/.classpath
==============================================================================
--- portals/pluto/trunk/.classpath	(original)
+++ portals/pluto/trunk/.classpath	Tue Sep 21 00:50:43 2004
@@ -10,5 +10,6 @@
 	<classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/castor/jars/castor-0.9.5.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.5.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/portlet/impl/PortletApplicationDefinitionImpl.java
==============================================================================
--- portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/portlet/impl/PortletApplicationDefinitionImpl.java
(original)
+++ portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/portlet/impl/PortletApplicationDefinitionImpl.java
Tue Sep 21 00:50:43 2004
@@ -147,6 +147,11 @@
 
     private void setContextRoot(String contextRoot)
     {
+        // Test for IBM WebSphere 
+        if (contextRoot != null && contextRoot.endsWith(".war")) 
+        {
+            contextRoot = contextRoot.substring(0, contextRoot.length()-4);
+        }
         this.contextPath = contextRoot;                
     }
 

Modified: portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/servlet/impl/WebApplicationDefinitionImpl.java
==============================================================================
--- portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/servlet/impl/WebApplicationDefinitionImpl.java
(original)
+++ portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/om/servlet/impl/WebApplicationDefinitionImpl.java
Tue Sep 21 00:50:43 2004
@@ -231,6 +231,11 @@
     
     protected void setContextRoot(String contextPath)
     {
+        // Test for IBM WebSphere 
+        if (contextPath != null && contextPath.endsWith(".war"))
+        {
+            contextPath = contextPath.substring(0, contextPath.length()-4);
+        }
         this.contextPath = contextPath;
     }    
 

Modified: portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
==============================================================================
--- portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
(original)
+++ portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
Tue Sep 21 00:50:43 2004
@@ -113,9 +113,20 @@
         }
         else
         {
-            baseWMDir = servletContext.getRealPath("");
-            baseWMDir = baseWMDir.substring(0,
-                                            baseWMDir.lastIndexOf(fileSeparator))+fileSeparator;
+            this.baseWMDir = this.servletContext.getRealPath("");
+            // BEGIN PATCH for IBM WebSphere 
+            if (this.baseWMDir.endsWith(fileSeparator)) {
+                this.baseWMDir = this.baseWMDir.substring(0, this.baseWMDir.length()-1);
+            }
+            // END PATCH for IBM WebSphere 
+            
+            this.baseWMDir = this.baseWMDir.substring(0,
+                                            this.baseWMDir.lastIndexOf(fileSeparator))+fileSeparator;
+            if (log.isDebugEnabled()) 
+            {
+                log.debug("servletContext.getRealPath('') =" + this.servletContext.getRealPath(""));
+                log.debug("baseWMDir = " + this.baseWMDir);
+            }            
         }
 
         // get portlet xml mapping file
@@ -171,6 +182,10 @@
             File entry = new File(baseWMDir+entries[i]);
             if (entry.isDirectory())
             {
+                if (log.isDebugEnabled()) 
+                {
+                    log.debug("Searching in directory: " + entries[i]);
+                }
                 load(baseWMDir, entries[i]);
             }
         }

Mime
View raw message