title: HTTP Status 404 in Struts2 web application
body: <p>Here is my set up:</p>
  
  <p>Specs:</p>
  
  <ul>
  <li>Tomcat 7.0.55 </li>
  <li>jdk1.8.0_11</li>
  <li>Eclipse Luna</li>
  <li>Win 8.1</li>
  </ul>
  
  <p>I have a Dynamic Web Project set up in Eclipse titled "Struts2Test" with following structure. Note: I am highlighting only the folders and files relevant to this question.</p>
  
  <pre><code>Struts2Test (project name)
   - [Java Resources]
     - [src]
       - [com.struts2action] (package)
           - HelloWorldAction.java
     - [Libraries]
       - [Struts2] (user defined library)
           - antlr-2.7.2.jar
           - bsf-2.3.0.jar
           - commons-beanutils-1.8.0.jar
           - commons-chain-1.2.jar
           - commons-digester-1.8.jar
           - commons-fileupload-1.1.1.jar
           - commons-io-1.1.jar
           - commons-logging-1.0.4.jar
           - commons-validator-1.3.1.jar
           - jstl-1.0.2.jar
           - oro-2.0.8.jar
           - standard-1.0.6.jar
           - struts-core-1.3.10.jar
           - struts-el-1.3.10.jar
           - struts-extras-1.3.10.jar
           - struts-faces-1.3.10.jar
           - struts-mailreader-dao-1.3.10.jar
           - struts-scripting-1.3.10.jar
           - struts-taglib-1.3.10.jar
           - struts-tiles-1.3.10.jar
   - [Web Content]
     - [WEB-INF]
       - [classes]
           - struts.xml
       - web.xml
     - error.jsp
     - index.jsp
     - success.jsp
  </code></pre>
  
  <p><strong>web.xml</strong></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" 
                 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
                 id="WebApp_ID" version="3.0"&gt;
  
                &lt;display-name&gt;Struts2Test&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;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;/web-app&gt;
  </code></pre>
  
  <p><strong>struts.xml</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;package name="helloworld" extends="struts-default"&gt;
  
                      &lt;!--  URL: hello  --&gt;  
                    &lt;action name="hello" 
                          class="com.struts2action.HelloWorldAction" 
                          method="execute"&gt;
                          &lt;result name="success"&gt;/success.jsp&lt;/result&gt;
                          &lt;result name="error"&gt;/error.jsp&lt;/result&gt;
                    &lt;/action&gt;
                    &lt;!-- more actions can be listed here --&gt;
  
                 &lt;/package&gt;
                 &lt;!-- more packages can be listed here --&gt;
  
              &lt;/struts&gt;
  </code></pre>
  
  <p><strong>HelloWorldAction.java</strong></p>
  
  <pre><code>    package com.struts2action;
  
      public class HelloWorldAction {
  
          public String execute() {
              System.out.println("HelloWorldAction - called");
              return "success";
          }
      }
  </code></pre>
  
  <p>I run and compile the program. I call the following: </p>
  
  <pre><code>http://localhost:8085/Struts2Test/hello.action
  </code></pre>
  
  <p>I keep getting the following error:</p>
  
  <p>HTTP Status 404 - /Struts2Test/hello.action</p>
  
  <p>type Status report
  message /Struts2Test/hello.action
  description The requested resource is not available.</p>
  
  <p>Apache Tomcat/7.0.55</p>
  
  <p>Could anyone please advise what the issue with my configuration is? </p>