title: org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found
body: <p>I am creating HelloWorld Example using Struts and getting exceptions.</p>
  
  <p>index.jsp</p>
  
  <pre><code>    &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%&gt;
  
  &lt;html:form&gt;
  Name : &lt;html:text property="name"&gt;&lt;/html:text&gt;
      &lt;html:submit value="Click"&gt;&lt;/html:submit&gt;
  
  &lt;/html:form&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      id="WebApp_ID" version="2.5"&gt;
      &lt;display-name&gt;HelloWorld&lt;/display-name&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;actionservlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.struts.actions.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;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;actionservlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.do&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>HelloFormBackup.java</p>
  
  <pre><code>public class HelloFormBackup extends ActionForm{
      private String name;
      public void setName(String name) {
          this.name = name;
      }
      public String getName() {
          return name;
      }
  
      @Override
      public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
  
          ActionErrors ae = new ActionErrors();
          if(name.equals("")){
              ae.add("name", new ActionMessage("msg"));   
          }
          return ae;
      }
  }
  </code></pre>
  
  <p>Messages.properties</p>
  
  <pre><code>msg=&lt;font color='red'&gt;  name is required.... &lt;/font&gt;
  </code></pre>
  
  <p>HelloController.java</p>
  
  <pre><code>public class HelloController extends Action {
  
      @Override
      public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
              HttpServletResponse response) throws Exception {
  
          String name = request.getParameter("name");
  
          request.setAttribute("result", "hello...."+name);
  
          return mapping.findForward("success");
      }
  }
  </code></pre>
  
  <p>success.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;%= request.getAttribute("result") %&gt;
  </code></pre>
  
  <p>Getting Below Exception when I am using Tomcat 6</p>
  
  <pre><code>  org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
          org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
          org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430)
          org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
          org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  
  
  root cause 
  java.lang.NullPointerException: Module 'null' not found.
      org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
      org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
      org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
      org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
      org.apache.jsp.index_jsp._jspx_meth_html_005fform_005f0(index_jsp.java:106)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:76)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  </code></pre>
  
  <p>and getting below exception when I am using Tomcat 7</p>
  
  <pre><code>org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 6
  
  3: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  4: &lt;%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%&gt;
  5: 
  6: &lt;html:form&gt;
  7: Name : &lt;html:text property="name"&gt;&lt;/html:text&gt;
  8:  &lt;html:submit value="Click"&gt;&lt;/html:submit&gt;
  9: 
  
  
  Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
  
  
  
  root cause 
  java.lang.NullPointerException: Module 'null' not found.
      org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
      org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
      org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
      org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
      org.apache.jsp.index_jsp._jspx_meth_html_005fform_005f0(index_jsp.java:115)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
  </code></pre>