title: How to get the id of html button through request get parameter in Java?
body: <p>I generate this section through while look in my Jsp Page and I'm assigning restaurant name ids to every button. What I want to do is get the button id when I click the submit button. </p>
  
  <pre><code>&lt;section class="content-wrap" id="content"&gt;
  
     &lt;ul&gt;
       &lt;img class="restaurant-logo" src="&lt;%= rs.getString("image") %&gt;"  alt="restaurant image" width="100" height="100" /&gt;
       &lt;li&gt; &lt;form id="menuform" action="menu.jsp"&gt;&lt;input type="submit" name="restaurantname" id="&lt;%= rs.getString("name") %&gt;" value="Go to Menu" class="main-button" style="float:right; margin-right:6px;"&gt;&lt;/form&gt;&lt;h3&gt;&lt;%= rs.getString("name") %&gt; - &lt;%= rs.getString("area") %&gt;, &lt;%= rs.getString("city") %&gt;&lt;/h3&gt;&lt;/li&gt;
       &lt;li style="font-style:italic; margin:-15px 0 5px 0;"&gt; &lt;%= rs.getString("cousines") %&gt;&lt;/li&gt;
       &lt;li style="color:#999; margin-bottom:2px;"&gt; Delivery:&lt;/li&gt;
       &lt;li &gt;Free&lt;/li&gt;
     &lt;/ul&gt;    
  &lt;/section&gt;
  </code></pre>
  
  <p>See the <code>menuform</code>. It has a button on which I click it goes to the menu page. And I want to get the id (which is restaurant name) in my menu page so I can display the menu. </p>
  
  <pre><code>&lt;form id="menuform" action="menu.jsp"&gt;&lt;input type="submit" name="restaurantname" id="&lt;%= rs.getString("name") %&gt;" value="Go to Menu" class="main-button" style="float:right; margin-right:6px;"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>If I do <code>request.getParameter("restaurantname")</code> in my menu page then it gives me "Go to Menu" which is obvious. What should I do?</p>