The method getDispatcherType() is undefined for the type HttpServletRequest
When I run my applicaiton from Eclipse it runs without any errors for servlet api 3.1.0 and 3.0.1. <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> </dependency> I use tomcat 8.0.21 for eclipse. I have set up tomcat8 on ubuntu machine which runs on tomcat 8.0.14 stable version. Unfortunately, I get the following error message if I use servlet api 3.1.0. But it works for the older version 3.0.1. root cause org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [50] in the generated java file