Tomcat7出现HTTP Status 500 - java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

时间:2022-01-16 06:40:45

今天在Tomcat7上发布了一个war,过一阵子发现localhost:8080都进不去了。在浏览器输入http://localhost:8080出现如下内容:

Tomcat7出现HTTP Status 500 - java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

几天折磨下来,看到bug就头痛,可是没办法啊,还是得想办法解决。

Google百度一番,终于得解。

如下:::

Tomcat7出现HTTP Status 500 - java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

里面说是EL表达式的错误,个人呢觉得方案2比较好用,

于是修改C:\Tomcat7\conf\context.xml如下:

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>
    <Loader delegate="true" />

<!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

<!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

加入了上面的粗体字后,停止Tomcat7服务,在启动Tomcat7服务,OK!!!

Tomcat7出现HTTP Status 500 - java.lang.ClassCastException: org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl的更多相关文章

  1. Tomcat7出现HTTP Status 500 - java&period;lang&period;ClassCastException&colon; org&period;apache&period;jasper&period;el&period;ELContextImpl cannot be cast to org&period;apache&period;jasper&period;el&period;ELContextImpl的解决

    今天在Tomcat7上发布了一个war,过一阵子发现localhost:8080都进不去了.在浏览器输入http://localhost:8080出现如下内容: HTTP Status 500 - j ...

  2. HTTP Status 500 - java&period;lang&period;NoClassDefFoundError&colon; JspTagException

    HTTP Status 500 - java.lang.NoClassDefFoundError: JspTagException cause  java.lang.NoClassDefFoundEr ...

  3. Tomcat连HBase报错: HTTP Status 500 - java&period;lang&period;AbstractMethodError&colon; javax&period;servlet&period;jsp&period;JspFactory&period;getJspApplicationContext

    Tomcat中连接HBase数据库,启动的时候报错: HTTP Status 500 - java.lang.AbstractMethodError: javax.servlet.jsp.JspFac ...

  4. SSH整合时执行hibernate查询报错&colon;java&period;lang&period;ClassCastException&colon; com&period;ch&period;hibernate&period;Department&lowbar;&dollar;&dollar;&lowbar;javassist&lowbar;0 cannot be cast to javassist&period;util&period;proxy

    今天在整合ssh三个框架时,有一个功能,是查询所有员工信息,且员工表和部门表是多对一的映射关系,代码能正常运行到查询得到一个List集合,但在页面展示的时候,就报异常了, java.lang.Clas ...

  5. java&period;lang&period;ClassCastException&colon; org&period;springframework&period;web&period;filter&period;CharacterEncodingFilter cannot be cast to javax&period;servlet&period;Filter

    java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast ...

  6. java&period;lang&period;ClassCastException&colon; net&period;sf&period;ezmorph&period;bean&period;MorphDynaBean cannot be cast to

    Java.lang.ClassCastException: net.sf.ezmorph.bean.MorphDynaBean cannot be cast to 在使用JSONObject.toBe ...

  7. spark提示Caused by&colon; java&period;lang&period;ClassCastException&colon; scala&period;collection&period;mutable&period;WrappedArray&dollar;ofRef cannot be cast to &lbrack;Lscala&period;collection&period;immutable&period;Map&semi;

    spark提示Caused by: java.lang.ClassCastException: scala.collection.mutable.WrappedArray$ofRef cannot b ...

  8. java&period;lang&period;ClassCastException&colon; org&period;springframework&period;web&period;filter&period;CharacterEncodingFilter cannot be cast

    严重: Exception starting filter encodingFilterjava.lang.ClassCastException: org.springframework.web.fi ...

  9. java&period;lang&period;ClassCastException&colon; xut&period;bookshop&period;entity&period;User&lowbar;&dollar;&dollar;&lowbar;javassist&lowbar;3 cannot be cast to javassist&period;util&period;proxy&period;Proxy

    报错信息 java.lang.ClassCastException: xut.bookshop.entity.User_$$_javassist_3 cannot be cast to javassi ...

随机推荐

  1. 《Linux内核分析》第二周 操作系统是如何工作的?

    [刘蔚然 原创作品转载请注明出处 <Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000] WEEK TWO(2 ...

  2. WebApi参数传递

    c# webapi的参数传递方式:1.查询字符串(query string):2.内容主体(content body) 当然也有cookie或url部分或头部信息(header)等其它传方式,这里仅讨 ...

  3. Smarty 模板引擎 fetch&lpar;&rpar;和display&lpar;&rpar;函数的区别?

    Smarty模板函数里面有这样一个方法:fetch("template.htm"),他和display("template.htm");最大的不同就是fetch ...

  4. iOS SnapKit自动布局使用详解

    对于自动布局: 我们在 StoryBoard 中可以使用约束实现,简单明了,但如果用纯代码来设置约束就很麻烦了 OC里面,我们常用的有Masonry,SDAutoLayout Swift里,我们有Sn ...

  5. 冒泡排序和选择排序(Go语言实现)

    冒泡排序和选择排序是排序算法中比较简单和容易实现的算法.冒泡排序的思想为:每一次排序过程,通过相邻元素的交换,将当前没有排好序中的最大(小)移到数组的最右(左)端.而选择排序的思想也很直观:每一次排序 ...

  6. Python 练习&colon;使用 &ast; 输出直角三角形

    正方向 height = int(input("please input height: ")) tmp = 1 while tmp <= height: width = t ...

  7. H - Repeats (重复最多子串的次数)

    题目链接:https://cn.vjudge.net/contest/283743#problem/H 题目大意:T组数据,给你一个字符串,然后让你求这个字符串的重复最多子串的次数. 具体思路:论文题 ...

  8. netty做集群 channel共享 方案

    netty做集群 channel如何共享? 方案一: netty 集群,通过rocketmq等MQ 推送到所有netty服务端, channel 共享无非是要那个通道都可以发送消息向客户端, MQ广播 ...

  9. servlet的总结

    tomcat在启动的时候 加载webapp下面的web.xml,加载里面定义的servlet. web.xml文件有两部分:servlet类定义和servlet映射定义每个被载入的servlet类都有 ...

  10. RabbitMQ入门&lpar;4&rpar;——路由&lpar;Routing&rpar;

    这一篇我们将介绍如何订阅消息的一个子集.例如,我们只需要将日志中的error消息存储到日志文件中而将所有日志消息都在控制台打印出来. 绑定(Bindings) 在前面的例子中,我们创建了交换机和队列的 ...