I am using Apache TomEE 1.7.4.
The dependencies added in my pom.xml
file are-
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.0</version>
</dependency>
To make use of the new string concatenation operator +=
like in -
<h:graphicImage
value="#{resource[facesContext.viewRoot.locale+='/default:img/rafa.png']}"/>
I replaced the EL 2.2 version with this-
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
</dependency>
But i am getting a -
Caused by: javax.el.ELException: Failed to parse the expression [#{resource[facesContext.viewRoot.locale+='/default:img/rafa.png']}]
at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:145)
at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:171)
at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:216)
at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:66)
at org.apache.webbeans.el22.WrappedExpressionFactory.createValueExpression(WrappedExpressionFactory.java:59)
at com.sun.faces.facelets.tag.TagAttributeImpl.getValueExpression(TagAttributeImpl.java:408)
... 43 more
Suggestions, if any?
I am not sure whether I will have to upgrade to version 8 since,
Apache Tomcat 8 supports the Java Servlet 3.1, JavaServer Pages 2.3, Java Unified Expression Language 3.0 and Java API for WebSocket 1.1 specifications.
OKay, it works perfect with
GlassFish(4.0) Java EE Application Server
.
But what I don't understand which entries to be made in pom.xml file-
Here, it is mentioned that the below dependency needs to be added in pom.xml
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version><!-- 7.0 (JSF 2.2) or 6.0 (JSF 2.0/2.1) --></version>
<scope>provided</scope>
</dependency>
After adding it, there is-
A screenshot to illustrate my confusion-
In the server logs, i found that the server is using this version of Mojarra
2016-06-08T17:26:36.778+0530|INFO: Initializing
Mojarra 2.2.0
( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0@11930)
with the lib folder of Glassfish 4.0 -
You see there is a jar file javaee
.
If I need to use the Mojarra 2.2.6
version, say for example, what exactly I need to do?