Tomcat 启动成功,但是网站的acton被访问的时候,报这个错误
The method getDispatcherType() is undefined for the type HttpServletRequest
说明
avax.servlet-api这个jar包没有被引用到发布的包中。
解决办法:在maven项目的pom.xml中加入以下dependency
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
即可解决问题。