JSF 2.0 Tomcat:JSPバージョンのコンテナが2.1より古いようです…
問題
JSF 2.0 WebアプリケーションをTomcat 6.0.26にデプロイする際、 ”
JSPバージョンのコンテナが2.1
より古い”という例外があり、Tomcatサーバーの起動に失敗しました。しかし、
JSP api v2.1
がプロジェクトクラスのパスに含まれています。なぜTomcatはまだJSPのバージョンが2.1より古いと言っていますか?
<dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> </dependency>
ここにエラースタックがあります…
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.
解決策
実際の根本的な原因はわかりませんが、解決策には
el-ri.jar
ライブラリが含まれています
<dependency> <groupId>com.sun.el</groupId> <artifactId>el-ri</artifactId> <version>1.0</version> </dependency>
__P.Sこのel-ri.jarはデフォルトのhttp://repo1.maven.org/maven2/[Mavenセントラルリポジトリ]で利用できます。