title: Forward from Action to Action
body: <p>Good afternoon in my timezone.</p>
  
  <p>I am developing a web application using struts framework.
  In a simple way, when the user call the application the first Action to be call is the SecurityAction, then this action redirects to one of the two actions, this is how i make the redirect :</p>
  
  <pre><code>     if (user == "type_profile")
             forward = mapping.forward("action2Fwd");
       else
             forward = mapping.forward("action3Fwd");
       return forward;
  </code></pre>
  
  <p>In the struts-config.xml i have</p>
  
  <pre><code>&lt;global-forwards&gt;
      &lt;forward name="action2Fwd" path="/action2.do"/&gt;
      &lt;forward name="action3Fwd" path="/action3.do"/&gt;
   &lt;/global-forwards&gt;
  &lt;action path="/action2"
              type="com.teste.dummy.action2"
              name="actionForm" 
              validate="true"
              input="/action2.jsp"&gt;
   &lt;/action&gt;
  </code></pre>
  
  <p>My first question: Is this the best way to redirect from an action to another action ?</p>
  
  <p>Second question : When i redirect to another action, the actionForm will execute, how can i know that this request come from another action ? </p>
  
  <p>Inside the form if the request comes from another action i do not want to validate anything , so i have to know that this request comes from another action and not from the "browser", one solution is to put some kind of flag in the request or session scope indicating that this request comes from another action, but is this the best way ?</p>