You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2007/03/06 02:03:52 UTC
svn commit: r514938 - in /portals/pluto/branches/pluto-1.1.x/pluto-taglib:
pom.xml src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java
Author: ddewolf
Date: Mon Mar 5 17:03:51 2007
New Revision: 514938
URL: http://svn.apache.org/viewvc?view=rev&rev=514938
Log:
Fixing admin page portlet and all el using tags
Modified:
portals/pluto/branches/pluto-1.1.x/pluto-taglib/pom.xml
portals/pluto/branches/pluto-1.1.x/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java
Modified: portals/pluto/branches/pluto-1.1.x/pluto-taglib/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-taglib/pom.xml?view=diff&rev=514938&r1=514937&r2=514938
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-taglib/pom.xml (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-taglib/pom.xml Mon Mar 5 17:03:51 2007
@@ -12,6 +12,7 @@
<description>Pluto's Java Portlet Specification Tag Library implementation</description>
<dependencies>
+
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
@@ -30,6 +31,13 @@
<version>${jsp-api.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>${commons-logging.version}</version>
+ </dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified: portals/pluto/branches/pluto-1.1.x/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java?view=diff&rev=514938&r1=514937&r2=514938
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ExpressionEvaluatorProxy.java Mon Mar 5 17:03:51 2007
@@ -16,17 +16,23 @@
*/
package org.apache.pluto.tags.el;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.JspException;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.TreeMap;
public abstract class ExpressionEvaluatorProxy {
- private static final Map FACTORIES = new HashMap();
+ private static final Log LOG = LogFactory.getLog(ExpressionEvaluatorProxy.class);
+
+ private static final Map FACTORIES = new TreeMap();
private static ExpressionEvaluatorProxy proxy;
@@ -41,10 +47,20 @@
Map.Entry entry = (Map.Entry)entrySetIterator.next();
if(isPageContextMethodAvailable(entry.getKey().toString())) {
try {
- Class proxyClass = Class.forName(
- ExpressionEvaluatorProxy.class.getPackage().getName()+entry.getValue()
- );
+ String className =
+ ExpressionEvaluatorProxy.class.getPackage().getName()+"."+entry.getValue();
+
+ if(LOG.isInfoEnabled()) {
+ LOG.info("Attempting to utilize expression evaluator proxy '"+className+"'");
+ }
+
+ Class proxyClass = Class.forName(className);
proxy = (ExpressionEvaluatorProxy)proxyClass.newInstance();
+
+ if(proxy != null) {
+ break;
+ }
+
} catch (ClassNotFoundException e) {
throw new RuntimeException("Unable to find ExpressionEvaluatorProxy '"+entry.getValue()+"'");
} catch (IllegalAccessException e) {
@@ -56,6 +72,8 @@
}
if(proxy == null) {
throw new RuntimeException("Unable to find a supported proxy");
+ } else {
+ LOG.info("ExpressionEvaluator Proxy Found: "+proxy.getClass().getName());
}
}