title: map action with struts.xml with multiple methods
body: <p>I have seen many tutorials in which action has many methods other than execute</p>
  
  <pre><code>public class UserAction {
  
      public TestAction() {
      }
  
      public String execute() throws Exception {
        System.out.println("hello i aam action");
  
          return "success";
      }
  
      public String addUser(String name)
      {
  
       return "success";
  
  
     }
  
      public String listUser(String name)
      {
  
       return "success";
  
  
      }
  
      }
  </code></pre>
  
  <p>the action mapping is done like this</p>
  
  <pre><code>  &lt;action name="addUser" method="addUser" class="com.vaannila.web.UserAction"&gt;
    &lt;result name="success" type="redirect"&gt;listUser&lt;/result&gt;
  &lt;/action&gt;
  
  &lt;action name="listUser" method="listUser" class="com.vaannila.web.UserAction"&gt; 
    &lt;result name="success"&gt;/register.jsp&lt;/result&gt;
   &lt;/action&gt;
  </code></pre>
  
  <p>I a unable to understand it.How listUser is getting called?</p>