JSF 2.0 + Tomcat : It appears the JSP version of the container is older than 2.1…

Problem

While deploying JSF 2.0 web application to Tomcat 6.0.26, hits the “JSP version of the container is older than 2.1” exception and failed to start the Tomcat server. But the JSP api v2.1 is included in the project class path, why the Tomcat is still saying that JSP version is older than 2.1?

    <dependency>
	 <groupId>javax.servlet.jsp</groupId>
	 <artifactId>jsp-api</artifactId>
	 <version>2.1</version>
    </dependency>

Here’s the error stacks…

SEVERE: Critical error during deployment: 
   ...
Caused by: com.sun.faces.config.ConfigurationException: 
It appears the JSP version of the container is older than 2.1 and unable to 
locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. 
 
If not using JSP or the EL RI, make sure the context initialization parameter, 
com.sun.faces.expressionFactory, is properly set.

Solution

Not really sure the root cause of it, but the solution is include the el-ri.jar library

  <dependency>
     <groupId>com.sun.el</groupId>
     <artifactId>el-ri</artifactId>
     <version>1.0</version>
  </dependency>

P.S This el-ri.jar is available at the default Maven central repository.

Note
The JSF 2.0 released note didn’t mention about this el-ri.jar dependency library, that’s weird.

Updated – 21-10-2010

This “el-ri.jar” is too old, it’s recommended to use the latest “el-impl-2.2.jar”, from Java.net

     <dependency>
	  <groupId>org.glassfish.web</groupId>
	  <artifactId>el-impl</artifactId>
	  <version>2.2</version>
     </dependency>
Tags :

About the Author

mkyong
Founder of Mkyong.com and HostingCompass.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

  • Pingback: YouTube views kopen()

  • Pingback: water ionizer()

  • Pingback: water ionizer machine()

  • Pingback: laan hurtige penge nu()

  • Pingback: stop parking()

  • Pingback: stop parking()

  • Pingback: youporn()

  • Pingback: DIRECTV for your company()

  • Pingback: check out DIRECTV channels()

  • Pingback: streaming movies()

  • Pingback: watch free movies online()

  • Pingback: Blue Coaster33()

  • Victor

    After I’ve put the el-impl 2.2 dependency I got the following error:
    javax.servlet.ServletException: FacesContext must not be null
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
    root cause

    java.lang.IllegalArgumentException: FacesContext must not be null

  • mahesh

    Just some update if someone get the error like me…
    I get the El parsing error for JSF Table manipulation example
    I solved it put I have include to jars AS suggested by mkyong
    el-api-2.2.jar
    el-impl-2.2.jar
    jstl-impl-1.2.jar

    and also one context parameter in web.xml for new EL version

    com.sun.faces.expressionFactory
    com.sun.el.ExpressionFactoryImpl

    thanks Mkyong
    for this valuable resource

    • http://www.mkyong.com mkyong

      Glad to know it worked for you, we all learn through sharing :)

  • http://www.numisreview.biz Archie Medes

    “el-impl-2.2.jar” from Java.net>>> Thanks for pointing me to the right direction for a solution to this problem.

  • Pingback: JSF 2.0 Tutorials()

  • Pingback: JSF 2.0 hello world example()