错误是:
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [Unable to compile class for JSP] with root cause
java.lang.ClassCastException: de.odysseus.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:180)
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:107)
at org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:110)
.....该项目正在使用war覆盖,其中覆盖的项目具有juel-impl jar,这是其使用shindig所必需的。有没有办法在子项目jsp页面中使用jstl?
发布于 2012-04-07 19:17:00
在您的类路径中似乎有两个相互竞争的EL API,tomcat的和您的应用程序中的另一个。您的war文件不能包含el-api.jar或juel-api.jar。确保排除这些依赖项。
发布于 2014-01-30 13:05:50
Juel 2.1.3 jar是以下jar的组合: juel-impl.jar、juel-spi.jar和juel-api.jar。当我们在pom中包含juel 2.1.3jar并在tomcat7中部署时,我们也遇到了同样的问题。
通过从pom中删除Juel 2.1.3并仅添加juel-impl来解决此问题。
<groupId>de.odysseus.juel</groupId> <artifactId>juel-impl</artifactId> <version>2.2.6</version> </dependency>您还需要添加de.odysseus.juel juel-API2.2.6
juel 2.1.3 jar包含javax/el接口,也是jsp-api jar的一部分。
我希望这能有所帮助。
https://stackoverflow.com/questions/10031678
复制相似问题