访问tomcat7 java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl
可以正常发布项目不报错,访问jsp和http://localhost:8080就报错后台报的错:2012-11-1714:01:32org.apache.catalina...
可以正常发布项目不报错,访问jsp和http://localhost:8080就报错
后台报的错:2012-11-17 14:01:32 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl] with root cause
java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
前台的:
java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl 展开
后台报的错:2012-11-17 14:01:32 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl] with root cause
java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
前台的:
java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl 展开
展开全部
EL表达式的错误
解决方案1:
当项目中引用tomcat目录下面的lib下面的catalina.jar的时候,用myeclipse将项目部署到tomcat下面的时候,会将catalina.jar包加到项目的web-inf下面的lib文件夹下面,这样这个包就会和tomcat下面的lib下面的catalina.jar包冲突会报java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor错误,解决方法是将项目部署到tomcat下面后,将项目的web-inf/lib下面的catalina.jar删掉,然后在重启tomcat,ok。
方案2:
修改了tomcat里的context.xml文件,在context 元素下添加
<Context>
<Loader delegate="true" />
解决方案1:
当项目中引用tomcat目录下面的lib下面的catalina.jar的时候,用myeclipse将项目部署到tomcat下面的时候,会将catalina.jar包加到项目的web-inf下面的lib文件夹下面,这样这个包就会和tomcat下面的lib下面的catalina.jar包冲突会报java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor错误,解决方法是将项目部署到tomcat下面后,将项目的web-inf/lib下面的catalina.jar删掉,然后在重启tomcat,ok。
方案2:
修改了tomcat里的context.xml文件,在context 元素下添加
<Context>
<Loader delegate="true" />
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询