org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

这个问题纠结了好久,好几个项目都报出相同的错误,以至于想象到Tomcat的问题,卸载重装~~然并卵

------网上大致有两种解决办法,类似于这样:

解决案1:
项目引用tomcat目录libcatalina.jar用myeclipse项目部署tomcatcatalina.jar包加项目web-inflib文件夹tomcatlibcatalina.jar包冲突报java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor错误解决项目部署tomcat项目web-inf/libcatalina.jar删掉重启tomcatok

解决案2:
修改tomcatcontext.xml文件context 元素添加
<Context>
<Loader delegate="true" />
 
										然而对我都不好用
后面在stackoverflow上看到了这段话:

 
 

That can happen if your webapp ships with servletcontainer-specific JAR files such as jasper.jarjetty.jar servlet.jar, etc in the /WEB-INF/lib for some unclear reason. This is in turn conflicting with with a different versioned JAR file on the target servletcontainer.

Remove that servletcontainer-specific JAR file from your webapp's /WEB-INF/lib. It doesn't belong there. It's supposed to be already supplied by the servletcontainer itself.

起因是jetty和相关tomcat的jar包冲突:

解决办法:把pom中的有关jetty的jar注释掉即可

<!--   <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-server</artifactId> <version>8.1.8.v20121106</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-webapp</artifactId> <version>8.1.8.v20121106</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-servlet</artifactId> <version>8.1.8.v20121106</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-jsp</artifactId> <version>8.1.8.v20121106</version> </dependency> -->

这样,从新部署,成功~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值