portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddew...@apache.org
Subject svn commit: r516791 - /portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
Date Sat, 10 Mar 2007 21:47:57 GMT
Author: ddewolf
Date: Sat Mar 10 13:47:56 2007
New Revision: 516791

URL: http://svn.apache.org/viewvc?view=rev&rev=516791
Log:
PLUTO-336; Manual registration of application ids;  Moving from 1.1.x

Modified:
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java?view=diff&rev=516791&r1=516790&r2=516791
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
Sat Mar 10 13:47:56 2007
@@ -60,6 +60,8 @@
      */
     private static final Log LOG = LogFactory.getLog(PortletContextManager.class);
 
+    public static final String CONTEXT_PATH_PARAM = "org.apache.pluto.CONTEXT_PATH";
+
     /**
      * The singleton manager instance.
      */
@@ -114,7 +116,7 @@
     public String register(ServletConfig config) throws PortletContainerException {
         InternalPortletContext portletContext = register(config.getServletContext());
 
-         PortletAppDD portletAppDD =
+        PortletAppDD portletAppDD =
             portletContext.getPortletApplicationDefinition();
         PortletDD portletDD = null;
 
@@ -154,6 +156,11 @@
 
             fireRegistered(portletContext);
         }
+
+        if(LOG.isInfoEnabled()) {
+            LOG.info("Registered portlet application with application id '"+applicationId+"'");
+        }
+        
         return (InternalPortletContext)portletContexts.get(applicationId);
     }
 
@@ -280,6 +287,14 @@
             } catch (Exception e) {
                 LOG.warn("Unable to directly retrieve context path from ServletContext. Computing.
. . ");
             }
+        }
+
+        if(contextPath == null) {
+            contextPath = context.getInitParameter(CONTEXT_PATH_PARAM);
+        }
+
+        if(contextPath == null) {
+            context.getAttribute(CONTEXT_PATH_PARAM);
         }
 
         if(contextPath == null) {



Mime
View raw message