Plugin JUEL

A recent addition to javax.el.ExpressionFactory have been the static methods newInstance() and newInstance(java.util.Properties).

With these methods, selection of a particular EL implementation is completely transparent to the application code. E.g., the first line of our Quickstart example could be rewritten as

ExpressionFactory factory = ExpressionFactory.newInstance();

Either of the new methods will determine a factory implementation class and create an instance of it. The first variant will use its default constructor. The latter will use a contructor taking a single java.util.Properties object as parameter. The lookup procedure uses the Service Provider API as detailed in the JAR specification. The JUEL jars have been setup accordingly. If on your classpath, the search will detect de.odysseus.el.ExpressionFactoryImpl as service provider class.

This way, JUEL can be used without code references to any of its implementation specific classes. Just javax.el.*...

Note
Note that the added API is just a proposal for the next JSP MR and may not be final.

Depending on your application's scenario, there may be several ways to register JUEL as default EL implementation.

Please refer to the section on Factory Configuration on how to configure an expression factory via property files.