title: java.lang.NullPointerException at org.apache.jsp.page_jsp._jspInit in Tomcat 6, but works in Tomcat 7
body: <p>In my servlet I do:</p>
  
  <pre><code>request.getRequestDispatcher("/page.jsp").forward(request,response);
  </code></pre>
  
  <p>I get the following <code>NullPointerException</code> on Tomcat 6, but it works in Tomcat 7.</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException
      at org.apache.jsp.page_jsp._jspInit(page_jsp.java:23)
      at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
      at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at com.dotvocal.poa.vocal.main.servlet.LoadCompany.execute(MyServlet.java:100)
      at com.dotvocal.poa.vocal.main.servlet.LoadCompany.doGet(MyServlet.java:60)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>I also tried the following:</p>
  
  <pre><code>request.getRequestDispatcher("http://localhost:8080/myapp/page.jsp").forward(request,response);
  </code></pre>
  
  <p>But it didn't solve the problem.</p>