title: HTTP Status 500 - An exception occurred processing JSP page in Struts2 application
body: <p>I am learning Struts2 and facing the below problem while hosting my application.
  The <code>index.jsp</code> page, having /struts-tags example <code>&lt;s:form&gt;, &lt;s:url&gt;</code> etc, is throwing exception when the application is hosted.</p>
  
  <p><strong>Jars used in the project:</strong></p>
  
  <pre><code>common-lang3.jar
  commons-fileupload-1.3.jar
  commons-io-2.0.1.jar
  commons-logging-1.1.3.jar
  commons-logging-api-1.1.jar
  freemarker-2.3.19.jar
  javassist-3.11.0.GA.jar
  ognl-3.0.6.jar
  struts2-core-2.3.15.3.jar
  xwork-core-2.3.15.3.jar
  </code></pre>
  
  <p><strong>Exception stack-trace:</strong></p>
  
  <pre><code>    **HTTP Status 500 - An exception occurred processing JSP page /index.jsp at line 12**
      **type** Exception report
      **message** An exception occurred processing JSP page /index.jsp at line 12
  
      **description** The server encountered an internal error that prevented it from fulfilling this request.
  
      **exception**
      org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 12
  
      9: &lt;/head&gt;
      10: 
      11: &lt;body&gt;
      12:    &lt;s:form action="empinfo" method="post"&gt;
      13:       &lt;s:textfield name="name" label="Name" size="20" /&gt;
      14:       &lt;s:textfield name="age" label="Age" size="20" /&gt;
      15:       &lt;s:submit name="submit" label="Submit" align="center" /&gt;
  
  
      Stacktrace:
  
   org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
          org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
          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)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
  
      **root cause**
      javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.containsIgnoreCase(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
          org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
          org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
          org.apache.jsp.index_jsp._jspService(index_jsp.java:84)
          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)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
  
      **root cause**
      java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.containsIgnoreCase(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
          org.apache.struts2.views.util.DefaultUrlHelper.buildUrl(DefaultUrlHelper.java:180)
          org.apache.struts2.views.util.DefaultUrlHelper.buildUrl(DefaultUrlHelper.java:75)
          org.apache.struts2.views.util.DefaultUrlHelper.buildUrl(DefaultUrlHelper.java:70)
          org.apache.struts2.components.ServletUrlRenderer.renderFormUrl(ServletUrlRenderer.java:200)
          org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:231)
          org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:801)
          org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:55)
          org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
          org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:104)
          org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
          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)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
  </code></pre>
  
  <p><strong><code>index.jsp</code> page:</strong></p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
     pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="s" uri="/struts-tags"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Employee Form&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
     &lt;s:form action="empinfo" method="post"&gt;
        &lt;s:textfield name="name" label="Name" size="20" /&gt;
        &lt;s:textfield name="age" label="Age" size="20" /&gt;
        &lt;s:submit name="submit" label="Submit" align="center" /&gt;
     &lt;/s:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong><code>struts.xml</code>:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
     "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  &lt;struts&gt;
   &lt;constant name="struts.devMode" value="true" /&gt;
     &lt;package name="helloworld" extends="struts-default"&gt;
        &lt;action name="empInfo" class="com.tutorialspoint.struts2.EmployeeAction" method="execute"&gt;
              &lt;result name="input"&gt;/index.jsp&lt;/result&gt;
              &lt;result name="success"&gt;/success.jsp&lt;/result&gt;
        &lt;/action&gt;
     &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p><strong><code>web.xml</code>:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
      &lt;display-name&gt;HelloWorldStruts2&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;filter&gt;
          &lt;filter-name&gt;struts2&lt;/filter-name&gt;
          &lt;!--&lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;--&gt;
          &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
      &lt;/filter&gt;
  
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;struts2&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Please suggest how can I fix this issue.</p>