title: The method getDispatcherType() is undefined for the type HttpServletRequest
body: <p>When I run my applicaiton from Eclipse it runs without any errors for servlet api 3.1.0 and 3.0.1.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
      &lt;version&gt;3.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <pre><code>root cause
  
  org.apache.jasper.JasperException: Unable to compile class for JSP: 
  
  An error occurred at line: [50] in the generated java file: [/var/lib/tomcat8/work/Catalina/localhost/ROOT/org/apache/jsp/WEB_002dINF/view/templates/login_002dtemplate_jsp.java]
  The method getDispatcherType() is undefined for the type HttpServletRequest
  
  Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
  </code></pre>
  
  <p>Why do I get this error? How to fix this?</p>