I hava a form which is populated dynamically in my JSP. Every row has a checkbox element attached to it. The user can click can select any number of rows and when he submits the form I want all the rows selected be passed to the servlet. How do i do this? This is my form element in the JSP
<form name="Select_Reqs" action="associate" method="post">
<table width="500" cellpadding="1px" cellspacing="0px">
<tr>
<td>Req Number</td>
<td>Business Group</td>
<td>Hiring Manager</td>
</tr>
<% List <ReqDetailsBean> all_reqs = (List <ReqDetailsBean>) request.getAttribute("req_list");
request.removeAttribute("req_list");
ReqDetailsBean item = new ReqDetailsBean();
int i=0;
if(all_reqs.isEmpty()){
%>
<h1>List is Empty</h1>
<%}
while(i<all_reqs.size()){
item=all_reqs.get(i);
i++;
%>
<tr>
<td>
<%= item.getJob_code() %>
</td>
<td>
<%= item.getBusiness_unit() %>
</td>
<td>
<%= item.getHiring_manager_name() %>
</td>
<td>
<input type="checkbox" name="select_req"/>
</td>
</tr>
<% }%>
</table>
<input type="submit" name="Submit" action="associate"/>
</form>
I know I can do this in AJAX. But i dont know that technology and I have a time constraint on me. Any help is really appreciated.
Use this in the servlet to obtain the submitted selected checkboxes: