The Black Bean Source™
User Guide for EL-Functors 1.0.2


This project is a functor object resolver library and tag library for the Java™ EE 5 unified expression language. It extends the expression language used in JSF1.2 and JSP2.1 pages to directly expose static and dynamic methods and constructors of plain Java objects or beans.

Quick Start

The EL-Functors library is an extension of the javax.el.ELResolver class. To use the EL-Functors, you just need to drop the EL-Functors-version.jar into the WEB-INF/lib folder of your project. Java Server Faces applications will automatically pick up the resolver from the META-INF/faces-config.xml entry in that jar. If you are using the EL in bare JSP (not accessed via JSF), then you also need to add the ServletContextListener reference to your web.xml descriptor like this:


Then the following types of EL expressions become available:

Reference Type EL-Resolver Expression TagLib Function Expression
Dynamic methods ${strValue.substring$2[3][strValue.length$ - 2]} ${el:dynamicMethod(strValue,'substring',2,false)[3][fn:length(strValue) - 2]}
Static methods ${$3["apple"]["banana"]["orange"]} ${el:staticMethod('java.util.Arrays','asList',3,false)["apple"]["banana"]["orange"]}
Static fields (constants) ${} ${el:staticField('java.awt.Color','RED')}
Constructors ${$1[""]} ${el:constructor('',1,false)[""]}
Augmented deferred methods action="#{myMap.put$_[aKey][aValue].action}" action="#{el:dynamicMethod(myMap,'put',2,true)[aKey][aValue].action}"

In addition, the following JSP tag is available:

<el:define var="x" value="${rtexpr}" />

For more detail see the expression syntax and tag library description pages.