今天升级到tomcat8,发现原来的项目不能运行了,遇到下面的错误:The method getDispatcherType() is undefined for the type HttpServletRequest。 
意思就是在HttpServletRequest没有定义getDispatcherType方法,上网找找了资料说是因为tomcat8里已经有了,老项目里的和他重复了,打开lib目录,找到servlet-api-XXX.jar将其改名如下图。

然后重新启动项目OK了。

另外一般ecliplse是没有tomcat8的,最高到tomcat7,这是需要安装一个ecllipse的插件。进到help的“install new software”,输入插件地址:http://download.eclipse.org/webtools/repository/luna

pending结束后打开“Web Tools Platform(WTP) 3.6.3”,找到下图所示的两个插件,安装上就有了

升级到tomcat8遇到The method getDispatcherType() is undefined for the type HttpServletRequest的更多相关文章

  1. The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8(转)

    配置项目,从tomcat低版本,放到tomcat8时,正常的项目居然报错了: The method getDispatcherType() is undefined for the type Http ...

  2. The method getDispatcherType() is undefined for the type HttpServletRequest

    在使用百度的ueditor的时候,老是报错: The method getDispatcherType() is undefined for the type HttpServletRequest 原 ...

  3. The method getDispatcherType() is undefined for the type HttpServletRequest错误解决方法

    使用Eclipse Luna版本,jdk1.7和tomcat8.0开发JAVA EE应用.写一个简单的JSP部署后访问报JSP编译错误,具体错误信息如下: The method getDispatch ...

  4. The method getServletContext() is undefined for the type HttpServletRequest

    request.getServletContext().getRealPath("/") 已经加入了 sun runtime library但是还是提示错误 是因为 写法过时了改成 ...

  5. The method getTextContent() is undefined for the type Node

    eclipse 中 如果加入了 其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextCont ...

  6. notification 报错the method build() is undefined for the type Notificatin.Builder

    notification 报错the method build() is undefined for the type Notificatin.Builder 这事api版本号太低导致的 Notifi ...

  7. getTextContent()方法会出现The method getTextContent() is undefined for the type Node 提示

    eclipse 中 如果加入了 其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextCont ...

  8. dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;

    转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...

  9. The method getContextPath() is undefined for the type ServletContext

    我出错时,到网上说得是版本问题,我找到对应的包javax-servlet5.1.12.jar,把它删了,居然不报错了,原来是和包servlet-2_5-api.jar冲突了

随机推荐

  1. 一个关于原生 js 开发一款插件的前端教程

    教程链接: http://www.codeasily.net/course/plugin_course/ 写的不是很好,前面比较松后面比较急,请大家见谅,本人也没多少年前端经验,拿以前写过的教程网站, ...

  2. vimrc之fileformat

    我在Linux开发时经常会遇到这样的问题,在windows下编辑的文件拿到Linux下打开时发现会在每行的结尾出现一个^M的符号,影响美观 为了消除这个符号,刚开始不知道Linux下有unix2dos ...

  3. 使用Charles对Https请求进行抓包

    昨天对某个APP做分析的时候发现其请求是Https的,抓包工具不能正常的显示请求的内容及返回的情况.通过搜索发现Charles是支持针对Https抓包的.具体的操作如下: 1.电脑端安装SSL证书 2 ...

  4. Problem H. The Fence 通过取余判重,求得某个区间的某些个数为某个数的倍数。

    /** 题目:Problem H. The Fence 链接:https://vjudge.net/problem/Gym-101090H 题意:给定一个字符串,只有0或者1: 问:假如两个不同的1之 ...

  5. Eclipse 生成jar包

    Eclipse 生成jar包 打开 Jar 文件向导 Jar 文件向导可用于将项目导出为可运行的 jar 包. 打开向导的步骤为: 在 Package Explorer 中选择你要导出的项目内容.如果 ...

  6. asp.net中TextBox只能输入数字的最简洁的两种方法

    如下TextBox <asp:textboxonkeypress="isnum()"id="TextBox1"runat="server&quo ...

  7. ManicTime软件破解版自用

    ManicTime(时间管理软件)专业版 附破解教程 By tchivs - 『脱壳破解区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.cn htt ...

  8. poj 2117(割点的应用)

    题目链接:http://poj.org/problem?id=2117 思路:题目的意思是要求对于给定的无向图,删除某个顶点后,求最大的连通分量数.显然我们只有删掉割点后,连通分支数才会增加,因此我们 ...

  9. MySQL内连接查询

    1.语法: select 字段列表 from table1,table2 where 子句: select 字段列表 from table1 as 别名1 inner join table2 as 别 ...

  10. Laravel5.1 数据库--DB运行原生SQL

    Laravel操作数据库有三种:DB原生SQL.构建器.Model.这三种依情况而决定使用哪种更合适. 那么今儿咱就从DB原生SQL说起: 1 用DB门面原生SQL语句操作 用DB门面操作的话呢 无非 ...