getDispatcherType() is undefined for the type HttpServletRequest [duplicate]

I had the same issue when I had a conflicting servlet-api version I was using in IntelliJ that conflicted with what was supported in Tomcat 8.0.x… I was using Maven, so I just changed my dependency to this, then did a clean deploy of my webapp and the problem went away.

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
</dependency>

Leave a Comment