在使用百度的ueditor的时候,老是报错:

The method getDispatcherType() is undefined for the type HttpServletRequest

原因可能有二:1、是jar冲突了,把servlet-api的jar包直接删了就ok了。

2、tomcat版本低了,升级后就ok。

补充一下,关于第一个原因,我们可以扩展下,如果做java开发的时候,碰到class找不到或者method找不到的错误时,可以使用下面的命令

dependency:tree -Dverbose(如果集成了maven,可以直接使用此命令。如果没有,需要在命令前增加 mvn : mvn dependency:tree -Dverbose)

这样就会得到下面的输出,此时就可以分析哪些jar包冲突以及jvm在运行时加载了哪个class。如果遇到jar包冲突,可以在pom的dependency Hierarchy视图中选择加载jar包,排除

特定版本的jar包。

[INFO] cn.todaycity:web-sf:war:0.0.1-SNAPSHOT
[INFO] +- cn.todaycity:server-data-provider-clients-image:jar:2.0.1.1025:compile
[INFO] | +- com.aliyun.oss:aliyun-sdk-oss:jar:2.2.0:compile
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.4.1:compile - omitted for duplicate)
[INFO] | | +- org.jdom:jdom:jar:1.1:compile
[INFO] | | \- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] | | | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.2)
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile

[INFO] | | +- (commons-lang:commons-lang:jar:2.5:compile - omitted for conflict with 2.6)
[INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.2)

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. 升级到tomcat8遇到The method getDispatcherType() is undefined for the type HttpServletRequest

    今天升级到tomcat8,发现原来的项目不能运行了,遇到下面的错误:The method getDispatcherType() is undefined for the type HttpServl ...

  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. cf596d

    题意:有一排等高的树木,高度都为h.给出每棵树在数轴上的坐标,每次有可能是最左边或者最右边的立着的树倒下,概率都是0.5.最终所有树都倒下.每棵树在倒下的时候有p的概率向左倒,1-p的概率向右倒.如果 ...

  2. 单词(bzoj 3172)

    Description 某人读论文,一篇论文是由许多单词组成.但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次. Input 第一个一个整数N,表示有多少个单词,接下来N ...

  3. spring mvc 请求转发和重定向(转)

    spring mvc controller间跳转 重定向 传参 url:http://zghbwjl.blog.163.com/blog/static/12033667220137795252845/ ...

  4. VR系统的分类

    转载请声明转载地址:http://www.cnblogs.com/Rodolfo/,违者必究. 根据用户参与和沉浸感的程度,通常把虚拟现实分为4大类:桌面虚拟现实系统.沉浸式虚拟现实系统.增强虚拟现实 ...

  5. 配置https

    引子: 最近在一篇文章中了解到EFF(电子前哨基金会)为了推广https协议,成立了一个let'sencrypt项目,可以发放免费的证书,此证书可以被大多数主流浏览器所信任,这个邪恶的念头一爆发,就让 ...

  6. Python 迭代器 & __iter__方法

    转载来自: http://blog.csdn.net/bluebird_237/article/details/38894617 迭代器就是重复地做一些事情,可以简单的理解为循环,在python中实现 ...

  7. 一个请求在Struts2框架中的处理流程

    1.客户端向Servlet容器发起一个请求,将请求封装为HttpServletRequest对象. 2.HttpServletRequest首先经过web.xml中配置的struts2的过滤器,以及s ...

  8. vi使用

    vi filename :打开或新建文件,并将光标置于第一行首 vi +n filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi + ...

  9. 利用WCF创建简单的RESTFul Service

    1):用VS2013创建一个WCF的工程,如下图所示: 2):我们来看一下默认状态下的config文件内容,这里的内容我们会再后续的步骤中进行修改 <?xml version="1.0 ...

  10. linq in not in

    class A { public int B { get; set; } public string C { get; set; } } class Program { static void Mai ...