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:07:47 UTC
svn commit: r1197712 -
/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java
Author: lu4242
Date: Fri Nov 4 19:07:47 2011
New Revision: 1197712
URL: http://svn.apache.org/viewvc?rev=1197712&view=rev
Log:
MYFACES-3375 MyFaces can incorrectly determine that Portlets are not supported
Modified:
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java?rev=1197712&r1=1197711&r2=1197712&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/ExternalContextUtils.java Fri Nov 4 19:07:47 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;
+ }
}
}