title: Struts2: struts.xml doesn't forward to action name
body: <p>You will suppose this is a big question.but there might be a simple problem which I can't find the reason.  </p>
  
  <p>There is a form( a simple login) whose action name is 'loginAction' in a jsp page called 'index.jsp' . In the action class, the <code>execute()</code> method checks whether the username,password  are valid. If it is a valid login, execute() method returns SUCCESS which forward to another jsp page called 'account.jsp' in a folder called 'jsp' inside WEB-INF. </p>
  
  <p>The problem is that, struts.xml forwards all valid logins to the relavant url , but the page(account.jsp) cannot be retrieved.Browser gives 404 error.But the url which the browser says 'not available' was just copied and pasted to the browser's address bar manually. Then the page is displayed !!!<br>
  Here is the struts.xml file</p>
  
  <pre><code>&lt;struts&gt;
  
  &lt;include file="/struts_auth.xml" /&gt;
  &lt;package name="default" extends="struts-default" &gt;
  
      &lt;action name="login" &gt;
          &lt;result&gt;index.jsp&lt;/result&gt;
      &lt;/action&gt;        
      &lt;action name="loginAction" class="com.app.action.LoginAction"&gt;
          &lt;result name="success"&gt;/auth/acc&lt;/result&gt;    
          &lt;result name="input"&gt;index.jsp&lt;/result&gt;
      &lt;/action&gt;
  
  &lt;/package&gt;
  </code></pre>
  
  <p>  </p>
  
  <p>Here is the <code>struts_auth.xml</code> file which is included in above struts.xml  </p>
  
  <pre><code>&lt;struts&gt;
  
  &lt;package name="author" extends="default" namespace="/auth" &gt;
  
      &lt;action name="acc"&gt;
          &lt;result name="success"&gt;/WEB-INF/jsp/account.jsp&lt;/result&gt;  
          &lt;result name="input"&gt;index.jsp&lt;/result&gt;
      &lt;/action&gt;   
  
  &lt;/package&gt;
  </code></pre>
  
  <p>  </p>
  
  <p>and this is what browser says as the reason<br>
  <code>description: The requested resource (/app/auth/acc) is not available.</code>  But if this url (http://localhost:8084/app/auth/acc)just copied into the browser's address bar, it just shows the real  page . Please let me know where my problem is.</p>