Unified Expression Language and JSF 2
Last Updated on Tuesday, 17 May 2011 17:17
![]() |
|
Unified Expression Language 2.2
EL-2.2 is part of JSR-245 MR2 (JSP-2.2) and therefore not included in Tomcat6 nor Jetty6. EL-2.2 is part of Tomcat7 and Jetty7 , but with a few manual steps, you can use EL-2.2 even in current containers.
Add Unified expression language in your Java server faces project using Maven
Include the following snippet in the dependencies section of your project's pom.xml-file to get EL2 :
Include the java.net repository project's pom.xml-file or in your settings.xml :
Apache's EL 2.2 implementation
The above code uses Sun's EL 2.2 implementation from Glassfish. If you want to use Apache's implementation, you have to use the following dependencies from the Apache SNAPSHOT repository.
Include the following snippet in the <dependencies> section of your project's pom.xml-file:
web.xml settings
Include the following snippet in the <build><plugins> section of your project's pom.xml-file:
Tomcat 6 Configuration for EL 2.2
Tomcat6 has to be prepared, otherwise it will crash with a Exception on container startup:
1 ) Go to the tomcat home directory
2) Remove tomcats el-api.jar from the classpath:
3) Copy the EL-2.2 jars into ./lib (el-api-2.2.jar, el-impl-2.2.jar)
4) Make sure that your WARs don't contain those 2 el jars!
Tags: groupid , artifactid , dependency , /artifactid , version , /dependency , /version , project's , include , pom.xml-file , el-2.2