title: There is no Action mapped for namespace [/] and action name [Test] associated with context path [/TestStruts]. - [unknown location]
body: <p>I'm trying my first application on struts 2.3.16 in NetBeans 7.2.1. It shows the following error on entering a URL - <code>http://localhost:8080/TestStruts/Test.action</code> (There is a <code>Test.jsp</code> page).</p>
  
  <pre><code>WARNING: Could not find action or result: /TestStruts/Test.action
  There is no Action mapped for namespace [/] and action name [Test] associated with context path [/TestStruts]. - [unknown location]
      at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
      at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
      at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
      at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
      at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
      at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p><strong>The <code>Test.jsp</code> page:</strong></p>
  
  <pre><code>&lt;s:form namespace="/TestStruts" action="test"&gt;
      &lt;table border="0" class=""&gt;
              &lt;tr&gt;
  
                  &lt;td&gt;
                      &lt;s:textfield id="name" name="name" label="Enter your name"/&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;s:textfield id="email" name="email" label="Enter your email"/&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;s:submit value="Submit"/&gt;&lt;/td&gt;
              &lt;/tr&gt;
      &lt;/table&gt;            
  
  &lt;/s:form&gt;
  </code></pre>
  
  <p><strong>The action class:</strong></p>
  
  <pre><code>package actions;
  import com.opensymphony.xwork2.ActionSupport;
  
  public final class TestAction extends ActionSupport
  {
      private static final String SUCCESS = "success";
      private String name;
      private String email;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      @Override
      public String execute() throws Exception
      {
          System.out.println("name = "+name);
          System.out.println("email = "+email);
          return SUCCESS;
      }
  }
  </code></pre>
  
  <p><strong>The <code>strtus.xml</code> file:</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.enable.DynamicMethodInvocation" value="false" /&gt;
      &lt;constant name="struts.devMode" value="true" /&gt;
      &lt;constant name="struts.custom.i18n.resources" value="myapp" /&gt;
  
      &lt;package name="test" namespace="/TestStruts" extends="struts-default"&gt;
          &lt;action name="test" class="actions.TestAction" method="execute"&gt;
              &lt;result name="success"&gt;/Test.jsp&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  
  &lt;/struts&gt;
  </code></pre>
  
  <p><strong>The <code>web.xml</code> file:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/applicationContext.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;struts2&lt;/filter-name&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;session-config&gt;
          &lt;session-timeout&gt;
              30
          &lt;/session-timeout&gt;
      &lt;/session-config&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>In addition to jar files of Spring, I have added the following jar files to the classpath.</p>
  
  <ul>
  <li>commons-beanutils-1.8.0.jar</li>
  <li>commons-chain-1.2.jar</li>
  <li>commons-collections-3.1.jar</li>
  <li>commons-digester-2.0.jar</li>
  <li>commons-fileupload-1.3.jar</li>
  <li>commons-io-2.2.jar</li>
  <li>commons-lang3-3.1.jar</li>
  <li>commons-lang-2.4.jar</li>
  <li>commons-logging-1.1.3.jar</li>
  <li>commons-logging-api-1.1.jar</li>
  <li>commons-validator-1.3.1.jar</li>
  <li>freemarker-2.3.19.jar</li>
  <li>javassist-3.11.0.GA.jar</li>
  <li>ognl-3.0.6.jar</li>
  <li>struts2-core-2.3.16.jar</li>
  <li>struts2-spring-plugin-2.3.16.jar</li>
  <li>xwork-core-2.3.16.jar</li>
  </ul>
  
  <hr>
  
  <p>When the URL is changed to <code>.jsp</code> from <code>.action</code> like <code>http://localhost:8080/TestStruts/Test.jsp</code>, it shows the following warnings.</p>
  
  <pre><code>Dec 22, 2013 9:00:44 PM org.apache.struts2.components.ServletUrlRenderer warn
  WARNING: No configuration found for the specified action: 'test' in namespace: '/TestStruts'. Form action defaulting to 'action' attribute's literal value.
  Dec 22, 2013 9:00:45 PM org.apache.struts2.components.ServletUrlRenderer warn
  WARNING: No configuration found for the specified action: 'test' in namespace: '/TestStruts'. Form action defaulting to 'action' attribute's literal value.
  </code></pre>
  
  <p>What am I missing?</p>