title: Struts2 : How to determine action dynamically with Struts2 Tag Submit button
body: <pre><code>&lt;head&gt;
  &lt;title&gt;Struts 2 Login Application!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;s:form action="login" method="POST" validate="true"&gt;
  &lt;tr&gt;
  &lt;td colspan="2"&gt;
  Login
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;s:actionerror /&gt;
  &lt;s:fielderror /&gt;
  &lt;s:textfield name="username" label="Login name"/&gt;
  &lt;s:password name="password" label="Password"/&gt;
  &lt;s:submit value="Login" align="center"/&gt;
  &lt;s:submit value="Logout" align="center"/&gt;
  &lt;/s:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Hi , </p>
  
  <p>I have this Form made up of Struts2 Tags .</p>
  
  <p>My question is , how can i determine the action dynamically ? Means when the user clicks on Login Submit button , it should call the action login and if the user clicks on Logout Submit button , it should call the action logout ?</p>
  
  <p>Please tell me how to do this ??</p>