How to get EL 2.2 running on WAS 7 (using Myfaces and Primefaces)?

I am migrating a JSF 1.2 project running in WAS7 to JSF2 with Myfaces 2.1.7 and Primefaces.

So far, everything has worked more or less, inserting myfaces-bundle-2.1.7.jar and primefaces 3.3.RC1.jar into WEB-INF / lib and changing the boot order.

Now I'm trying to get EL2.2 to work: Are the corresponding classes part of the Myfaces Impl classes (in myfaces-bundle-2.1.7.jar, but with what specific configuration?), Or did I skip some specific library to add to / WEB -INF / lib?

Thanks for reading me;)

+4
source share
1 answer

EL 2.2 is not part of JSF 2.0. This is part of Servlet 3.0, which in turn is part of Java EE 6. But WebSphere 7 is a container of Java EE 5, not Java EE 6. JSF 2.0 is part of Java EE 6, but is backward compatible with Servlet 2.5 / Java EE 5, which is probably due to your confusion.

As said, WebSphere 7 is a Servlet 2.5 container and, therefore, does not ship with EL 2.2, but with EL 2.1. It is best to install an EL 2.1 implementation that supports the same improvements (calling methods with arguments) as in EL 2.2. There is only one: JBoss EL . To install it, simply release jboss-el.jar in webapp /WEB-INF/lib and add the following context parameter to your web.xml to tell MyFaces to use it instead.

 <context-param> <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name> <param-value>org.jboss.el.ExpressionFactoryImpl</param-value> </context-param> 
+6
source

Source: https://habr.com/ru/post/1416264/


All Articles