Jahia in English > Cannot use EL 2.2

0 (0 Good)
0 (0 Bad)

Cannot use EL 2.2

by  sbarriball »  2014/10/02 13:51

I'm not able to use JSP Expression Language 2.2 despite using a servlet 3.0 container.

I've tried updating the servlet version declared in the web.xml to version="3.0" and dumping the servlet version in a jsp shows version 3 

but any attempts to call methods within an expression e.g.

    <jsp:useBean id="today" class="java.util.Date" scope="page" />


results in an evaluation failure

Caused by: org.apache.jasper.JasperException: /PWC6296: The function compareTo must be used with a prefix when a default namespace is not specified

where the same code in a simple webapp running within the same tomcat 7 server evaluates correctly and gives

org.apache.jasper.JasperException: javax.el.ELException: java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Date




Number of messages  10
Registration date
0 (0 Good)
0 (0 Bad)

Re: Cannot use EL 2.2

by  sbarriball »  2014/10/14 13:12

So to answer my own question on this , the JSP Compiler an EL version is provided by an OSGI module called PAX-WEB which is not the same as the version provided by your Servlet Container. 

It seems as though EL2.2 support is not being added to PAX-WEB until 4.0 whereas Jahia is using 3.x.

I may look at adding EL2.2 via a 3rd party library e.g. JBOSS-EL, and will post to this forum if i find an answer.


Number of messages  10
Registration date

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page