title: data from selected rows to servlet
body: <p>This code is written in jsp.it is a dynamic table with rows and columns .When clicked on the submit button,only the selected rows and the data in that row should be fetched into the servlet.</p>
  
  <pre><code>``&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
      &lt;%@ page import="java.io.*,java.util.*,java.sql.*" %&gt;
      &lt;%@ page import="javax.servlet.http.*,javax.servlet.*" %&gt;
      &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %&gt;
      &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Saravana Bhavan&lt;/title&gt;
  &lt;link rel="stylesheet" href="css/lavish-bootstrap.css"/&gt;
  &lt;link rel="stylesheet" href="css/font-awesome.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form name="f1" method="post" action="Insertcheck.jsp"&gt;
  &lt;sql:setDataSource var="snapshot"
  driver="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@localhost:1521:xe"
  user="system" password="pswd"
  /&gt;
  &lt;sql:query dataSource="${snapshot}" var="result"&gt;
  select * from vendormenu
  &lt;/sql:query&gt;
  &lt;center&gt;&lt;h3&gt;Saravana Bhavan&lt;/h3&gt;
  &lt;h4 class="text-muted"&gt;Menu&lt;/h4&gt;&lt;/center&gt;
  &lt;div class="panel"&gt;
  &lt;table class="table table-bordered table-responsive" border="2" width="100%"&gt;
  &lt;tr&gt;
  
  &lt;td&gt;ITEM CODE&lt;/td&gt;
  &lt;td&gt;ITEM NAME&lt;/td&gt;
  &lt;td&gt;RATE&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  
  &lt;/tr&gt;
  &lt;c:forEach var="row" items="${result.rows}"&gt;
  &lt;center&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;c:out value="${row.mid }"/&gt;
  &lt;/td&gt;
  &lt;td&gt;&lt;c:out value="${row.mname }"/&gt;
  &lt;/td&gt;
  &lt;td&gt;&lt;c:out value="${row.cost }"/&gt;&lt;/td&gt;
  &lt;td&gt;&lt;div class="checkbox"&gt;
    &lt;label&gt;&lt;input type="checkbox" name="yes"&gt;&lt;/label&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/center&gt;
  &lt;/c:forEach&gt;
  &lt;/table&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;center&gt;&lt;input type="submit" /&gt;&lt;/center&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I need to print the values in each row selected using checkboxes by the user into the servlet from jsp.The rows are added dynamically. How to retrieve all the values from the rows selected?</p>