title: getting org.apache.jasper.JasperException: java.lang.NullPointerException
body: <p>Here is the directory structure of my java Struts based web application, and webRoot directory.</p>
  
  <p><img src="https://i.stack.imgur.com/4fpxp.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/m7dbE.png" alt="enter image description here"></p>
  
  <p>code is get compiled successfully but when i run it to browser it gives exception with HTTP Status 500:</p>
  
  <pre><code>org.apache.jasper.JasperException: java.lang.NullPointerException
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
  
  root cause 
  
  java.lang.NullPointerException
      org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)
      org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
      org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  </code></pre>
  
  <p>can anyone help me on this please Thanks in advance. </p>
  
  <p>I tried the war file to run external tomcat-7 but showed same error, also found this <a href="https://stackoverflow.com/questions/8574945/org-apache-jasper-jasperexception-java-lang-nullpointerexception">org.apache.jasper.JasperException: java.lang.NullPointerException</a> but not helpful for me.</p>
  
  <p>Here is web.xml </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                           "http://java.sun.com/dtd/web-app_2_3.dtd"&gt;
  &lt;web-app&gt;
   &lt;display-name&gt;Ilex Reports&lt;/display-name&gt;
   &lt;description&gt;Report Server&lt;/description&gt;
   &lt;servlet&gt;
    &lt;servlet-name&gt;rpt&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.apache.struts.action.ActionServlet&lt;/servlet-class&gt;
    &lt;init-param&gt;
     &lt;param-name&gt;config&lt;/param-name&gt;
     &lt;param-value&gt;/WEB-INF/struts-config.xml&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
     &lt;param-name&gt;host&lt;/param-name&gt;
     &lt;param-value&gt;localhost&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
     &lt;param-name&gt;port&lt;/param-name&gt;
     &lt;param-value&gt;80&lt;/param-value&gt;
    &lt;/init-param&gt;
   &lt;/servlet&gt;
   &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;rpt&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.xo&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
   &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;/index.jsp&lt;/welcome-file&gt;
   &lt;/welcome-file-list&gt;
   &lt;!-- Custom Tag Library Descriptors --&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;http://jakarta.apache.org/tomcat/fb-taglib&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/Element.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;!-- Struts Tag Library Descriptors --&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;/tags/struts-bean&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/struts-bean.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;/tags/struts-html&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/struts-html.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;/tags/struts-logic&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/struts-logic.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;/tags/struts-nested&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/struts-nested.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;taglib&gt;
    &lt;taglib-uri&gt;/tags/struts-tiles&lt;/taglib-uri&gt;
    &lt;taglib-location&gt;/WEB-INF/tld/struts-tiles.tld&lt;/taglib-location&gt;
   &lt;/taglib&gt;
   &lt;login-config&gt;
    &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
   &lt;/login-config&gt;
  &lt;/web-app&gt;
  </code></pre>