title: Forwarding a request from a JSF managed bean to a Struts 2 action does not work
body: <p>Within a JSF managed bean, I have the following code taken from <a href="https://stackoverflow.com/questions/1922154/jsf-how-to-forward-a-request-to-another-page-in-action/1922184#1922184">this past question</a>:</p>
  
  <pre><code>String uri = "/myAction";
  FacesContext.getCurrentInstance().getExternalContext().dispatch(uri);
  </code></pre>
  
  <p><code>myAction</code> is the name of a Struts action that is defined in my <code>struts.xml</code>.</p>
  
  <p>However when I access the JSF bean, I am not forwarded to <code>/myAction</code>. Instead I'm getting a 404 http error: <code>The requested resource (/MyApp/myAction) is not available</code>.</p>
  
  <p>Why doesn't it work??</p>
  
  <p>When I try to access <code>/myAction</code> directly from a browser by going to <code>http://localhost:8080/MyApp/myAction</code> all works fine.</p>