title: Flow of control in Struts 1.2 (Lifecycle)
body: <p>Title may sound a little vague but I'll give it a go. I have 2 servlets:</p>
  
  <ol>
  <li><strong>one.java:</strong> Extends the <code>Action class</code> forwards the page to success or failure based on the inputs at <code>index.jsp</code></li>
  <li><strong>two.java:</strong> Extends the <code>ActionForm class</code>, Has getters and setters method</li>
  </ol>
  
  <p>I have 3 jsp files:</p>
  
  <ol>
  <li><strong>index.jsp:</strong> Is the welcome pages and asks for a username combination</li>
  <li><strong>success.jsp:</strong> Is called if the combination is correct</li>
  <li><strong>failure.jsp:</strong> Is called if the combination is false</li>
  </ol>
  
  <p>I have 2 xml files:</p>
  
  <ol>
  <li><strong>web.xml:</strong> DD</li>
  <li><strong>struts-config.xml:</strong> Struts config file</li>
  </ol>
  
  <p>I understand how web.xml works. My only doubt is, which one of the, <b>one.java /two.java</b> is called first from the struts.xml?</p>
  
  <p>I tried to debug and found out that the <code>ActionForm</code> class i.e <code>two.java</code> is called first, then it returns the value to the <code>Action</code>i.e <code>one.java</code>.</p>
  
  <p>But isn't Action class is supposed to execute first,and then the action form ? I mean This is what MVC architecture follows.</p>
  
  <p>Please explain. Links to a very highly detailed workflow would be really helpful.</p>