You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/11/04 20:08:04 UTC

svn commit: r1197714 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java

Author: lu4242
Date: Fri Nov  4 19:08:04 2011
New Revision: 1197714

URL: http://svn.apache.org/viewvc?rev=1197714&view=rev
Log:
MYFACES-3375 MyFaces can incorrectly determine that Portlets are not supported

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java?rev=1197714&r1=1197713&r2=1197714&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java Fri Nov  4 19:08:04 2011
@@ -590,14 +590,16 @@ public final class ExternalContextUtils
     //Find bridge to tell if portal is supported
     if(context != null) 
     {
+      // Portlet 1.0 API found. In this case we have to consider that exists alternate
+      // bridge implementations like in WebSphere and others.
+      portlet10Supported = true;
+
       try
       {
         Class<?> bridge = ClassLoaderUtils.loadClass("javax.portlet.faces.Bridge");
         
         if(bridge != null)
         {
-          portlet10Supported = true;
-
           //Standard bridge defines a spec name which can be used to 
           //determine Portlet 2.0 Support.
           String specName = bridge.getPackage().getSpecificationTitle();
@@ -616,7 +618,13 @@ public final class ExternalContextUtils
       }
       catch (ClassNotFoundException e)
       {
-        _LOG.fine("Portlet API is present but bridge is not.  Portlet configurations are disabled.");
+        _LOG.fine("Portlet API is present but Standard Apache Portlet Bridge is not. " +
+                " This could happen if you are using an alternate Portlet Bridge solution.");
+        
+        if (resourceRequest != null)
+        {
+            portlet20Supported = true;
+        }
       }
     }