title: Error 404 issues using Struts application
body: <p>I am having some issues running a Struts web app since few days. I tried several solutions from StackOverflow relating to my problem but none of them works.</p>
  <p><strong>web.xml:</strong></p>
  <pre class="lang-xml prettyprint-override"><code>&lt;display-name&gt;Struts2 Application&lt;/display-name&gt;
  &lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;
  
          org.apache.struts2.dispatcher.FilterDispatcher
      &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;welcome-file-list&gt;
      &lt;welcome-file&gt;Login.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  <p><strong>struts.xml:</strong></p>
  <pre class="lang-xml prettyprint-override"><code>&lt;struts&gt;
      &lt;constant name=&quot;struts.enable.DynamicMethodInvocation&quot;
          value=&quot;false&quot; /&gt;
      &lt;constant name=&quot;struts.devMode&quot; value=&quot;false&quot; /&gt;
  
      &lt;constant name=&quot;struts.custom.i18n.resources&quot;
          value=&quot;ApplicationResources&quot; /&gt;
  
      &lt;package name=&quot;default&quot; extends=&quot;struts-default&quot; namespace=&quot;/&quot;&gt;
  
          &lt;action name=&quot;login&quot;
              class=&quot;net.viralpatel.struts2.LoginAction&quot;&gt;
              &lt;result name=&quot;success&quot;&gt;Welcome.jsp&lt;/result&gt;
              &lt;result name=&quot;error&quot;&gt;Login.jsp&lt;/result&gt;
  
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  <p><strong>Login.jsp:</strong></p>
  <pre class="lang-jsp prettyprint-override"><code>&lt;%@ page contentType=&quot;text/html; charset=UTF-8&quot;%&gt;
  &lt;%@ taglib prefix=&quot;s&quot; uri=&quot;/struts-tags&quot;%&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;title&gt;Struts 2 - Login Application | ViralPatel.net&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;h2&gt;Struts 2 - Login Application&lt;/h2&gt;
  &lt;s:actionerror /&gt;
  &lt;s:form action=&quot;login.action&quot; method=&quot;post&quot;&gt;
  
      &lt;s:textfield name=&quot;username&quot; key=&quot;label.username&quot; size=&quot;20&quot; /&gt;
      &lt;s:password name=&quot;password&quot; key=&quot;label.password&quot; size=&quot;20&quot; /&gt;
  
      &lt;s:submit method=&quot;execute&quot; key=&quot;label.login&quot; align=&quot;center&quot; /&gt;
  &lt;/s:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p><strong>LoginAction.java:</strong></p>
  <pre class="lang-java prettyprint-override"><code>package net.viralpatel.struts2;
  
  public class LoginAction {
      private String username;
      private String password;
  
      public String execute() {
  
          if (this.username.equals(&quot;admin&quot;)
                  &amp;&amp; this.password.equals(&quot;admin123&quot;)) {
              return &quot;success&quot;;
          } else {
              return &quot;error&quot;;
          }
      }
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  }
  </code></pre>
  <p><strong>Libs I have added:</strong></p>
  <ul>
  <li>commons-logging-1.1.3.jar</li>
  <li>freemarker-2.3.19.jar</li>
  <li>ognl-3.0.6.jar</li>
  <li>struts2-core-2.3.15.1.jar</li>
  <li>xwork-core-2.3.15.1.jar</li>
  </ul>
  <p><strong>Error accessing URL:</strong></p>
  <p><code>http://localhost:8080/StrutsHelloWorld/</code></p>
  <pre><code>HTTP Status 404 - /StrutsHelloWorld/
  
  type Status report
  
  message /StrutsHelloWorld/
  
  description The requested resource is not available.
  
  Apache Tomcat/7.0.42
  </code></pre>
  <p>I tried this <a href="https://dzone.com/articles/struts2-tutorial-part-27" rel="nofollow noreferrer">tutorial</a>.</p>
  <p>There are no errors on my console, problem view.</p>