title: how to understad a form is submitted in struts actions
body: <p>In struts2 actions the injection is used for setting the property values of an action class, so the properties are updated by form fields on the form submission. To discover which form is submitted I create a method calling <code>isFormSubmitted()</code> and in there I check a redundant property created only for this motive. The property is updated in a hidden field. But I find this workout so dirty! I think that there must be a better way to solve this problem. </p>
  
  <p>What I do is:</p>
  
  <pre><code>&lt;s:form name="form1"&gt;
    &lt;s:hidden name="submit" value="10" /&gt;
    ...other fields go here
  &lt;/s:form&gt;
  </code></pre>
  
  <p>in the action class I have <code>getSubmit</code>, <code>setSubmit</code> methods and the following method:</p>
  
  <pre><code>public boolean isFormSubmitted(){
    return (submit == 10);
  }
  </code></pre>