今天升级到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. 一个关于git push失败的解决方案

    问题背景:在GitHub上创建了一个repositorie, 本地初始化并添加了远程仓库后,在GitHub上创建了一个README.md文件(注意不是从本地git push上去的),随后本地修改工程源 ...

  2. php会话全揭秘

    一:php中sesion的配置 二: php手册中的函数 1:bool session_start ( void )  启动新会话或者重用现有会话 当会话自动开始或者通过 session_start( ...

  3. Camera2/HAL3

    Android Camera HAL3中拍照Capture模式下多模块间的交互与帧Result与帧数据回调https://blog.csdn.net/gzzaigcnforever/article/d ...

  4. Creating Dialogbased Windows Application (1) / 创建基于对话框的Windows应用程序(一)新建窗体 / VC++, Windows

    创建基于对话框的Windows应用程序(一) —— 新建窗体 1.新建一个Visual C++的Empty Project.  2.在Solution Explorer中右键Add New Item, ...

  5. java-SimpleDateFormatDemo & BirthDemo

    java日期格式设置,以及案例BirthDemo package com.example; import java.text.ParseException; import java.text.Simp ...

  6. SQL中使用视图的优点和缺点是什么

    视图的优点与缺点 在程序设计的时候必须先了解视图的优缺点,这样可以扬长避短,视图具有如下的一些优点: ● 简单性.视图不仅可以简化用户对数据的理解,也可以简化他们的操作.那些被经常使用的查询可以被定义 ...

  7. start-stop-daemon

    start-stop-daemon是OpenRC计划的一部分,这个程序最先出现在Debian系的Linux发行版中,这里有个比较古老的手册页面,更详细更直观的办法当然是通过man start-stop ...

  8. Tomcat (7.0)数据源配置

    在Tomcat这个Java Web容器下通过配置DataSource(数据源)对象能够解决上面所述的问题. JDBC中的javx.sql.DataSource接口负责建立于数据库的连接.程序中直接从数 ...

  9. CI的意思

    Continuous integration (CI) is the practice, in software engineering, of merging all developer worki ...

  10. 微信小程序 快键键

    快捷键 格式调整 - Ctrl+S:保存文件 - Ctrl+[, Ctrl+]:代码行缩进 - Ctrl+Shift+[, Ctrl+Shift+]:折叠打开代码块 - Ctrl+C Ctrl+V:复 ...