Using JBoss EL with Websphere

I am doing a project that will be launched on Websphere.

I am using JSF / Facelets / Richfaces for this project.

I want to use the JBoss EL implementation, since it allows you to call methods with parameters from EL, etc.

... this is usually achieved by getting the JBoss EL jar and then putting it in web.xml:

 <context-param>
  <param-name>com.sun.faces.expressionFactory</param-name>
  <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
 </context-param>

However, this does not work ... I do not know if there is a problem with Websphere or ... ???

I get a stack trace when going to the page, saying that it cannot parse EL, where I passed the method to the parameter:

<a4j:commandLink value="Delete" action="#{mcsaAdmin.deleteLanguage(1234)}" />

Looking at the stack, the standard EL sun still seems to be used:

Caused by: javax.el.ELException: Error Parsing: #{mcsaAdmin.deleteLanguage(1234)}
 at com.sun.el.lang.ExpressionBuilder.createNodeInternal(Unknown Source)
 at com.sun.el.lang.ExpressionBuilder.build(Unknown Source)
 at com.sun.el.lang.ExpressionBuilder.createMethodExpression(Unknown Source)
 at com.sun.el.ExpressionFactoryImpl.createMethodExpression(Unknown Source)
 at com.sun.facelets.tag.TagAttribute.getMethodExpression(TagAttribute.java:141)

Pay attention to "com.sun.el.ExpressionFactoryImpl" instead of "org.jboss.el.ExpressionFactoryImpl" as stated above ...

- ? - ... JSF majorra -, - sun richfaces 3.1.4 facelets 1.1.14.

+3
4

, Websphere, JSF, "com.sun.faces.expressionFactory" JSF. , MyFaces, "org.apache.myfaces.EXPRESSION_FACTORY".

+1

. jboss el jar?

0

. jboss-el.jar classpath/WEB-INF/lib web.xml

<context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>

. .

, . Java EE ELResolver

,

0

? websphere . web- Parent last, - .

, , - , websphere.

0

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


All Articles