title: how to get the value of name field of submit button which i can view on page source?
body: <p>I have created one HTML form which consists of multiple buttons of <code>"edit"</code> and <code>"delete"</code>. I put them in a <code>for</code> loop in order to view many of them on another page.</p>
  
  <p>How can I get the name field of the submit button, or whichever button I have clicked, on the next JSP page? Or, can you can provide me an alternative for this?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;% for (int t = 1; t &lt; 10; t++) { %&gt;
      &lt;label&gt;
          &lt;input type="submit" name="&lt;%=t %&gt;" value="edit" onclick="this.form.action='df1.jsp?flag=1&amp;act=1';this.form.submit();" /&gt;
          &lt;input type="submit" name="&lt;%=t %&gt;" value="delete" onclick="this.form.action='df1.jsp?flag=1&amp;act=1';this.form.submit();" /&gt;
      &lt;/label&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>When I view the page source, it's showing the <code>name="1"</code> for edit and <code>name="1"</code> for delete till <code>10</code>.</p>
  
  <p>I want to get the value of name field on server side. I also can't apply <code>request.getParameter()</code>, because I am not aware which button will user hit.</p>