Hi, i want to submit list of object of selectted check box and want to receive same object in controller from jsp.
Jsp Code-><form name="multiCheckBox" method="post" action="multiCheckbox.html">
<table>
<th>Below are the list of items with status</th>
</tr>
<tr>
<td>Select</td>
<td>Print Strip</td>
<td>Planogram DB Key</td>
<td>Planogram Name</td>
<td>Planogram Description</td>
<td>Status</td>
<td>Print PDF</td>
<td>Pause Printer</td>
</tr>
<c:forEach var="printStripList1" items="${printStripList}">
<input type="hidden" name="printStrip" value="${printStripList1.printStrip}"/>
<input type="hidden" name="planogramDBKey" value="${printStripList1.planogramDBKey}"/>
<input type="hidden" name="planogramDescrition" value="${printStripList1.planogramDescrition}"/>
<input type="hidden" name="status" value="${printStripList1.status}"/>
<input type="hidden" name="printPdf" value="${printStripList1.printPdf}"/>
<input type="hidden" name="pausePrinter" value="${printStripList1.pausePrinter}"/>
<tr>
<td>
<input type="checkbox" name="planogramName" value="${printStripList1.planogramName}">
</td>
<td><c:out value='${printStripList1.printStrip}' /></td>
<td><c:out value='${printStripList1.planogramDBKey}' /></td>
<td><c:out value='${printStripList1.planogramName}' /></td>
<td><c:out value='${printStripList1.planogramDescrition}' /></td>
<td><c:out value='${printStripList1.status}' /></td>
<td><c:out value='${printStripList1.printPdf}' /></td>
<td><c:out value='${printStripList1.pausePrinter}' /></td>
</tr>
</c:forEach>
</table>
<table>
<tr>
<td>
<INPUT id="submit" name="submit" type="submit" value="Submit Items"/>
Inline Code Example Here
Display page->
on display page when i am getting 10 checkbox an i am selecting 3. At controller when i am selecting the values
String[] planogramName = request.getParameterValues("planogramName");
String[] printStrip = request.getParameterValues("printStrip");
String[] planogramDBKey = request.getParameterValues("planogramDBKey");
String[] planogramDescrition = request.getParameterValues("planogramDescrition");
String[] status = request.getParameterValues("status");
String[] printPdf = request.getParameterValues("printPdf");
String[] pausePrinter = request.getParameterValues("pausePrinter");
On planogramName am receiving 3 array object but for other am getting 10. I want only those 3 selected. How i can achieve this. Please help