I have a table where you have the column
ID - NAME - ACTION
1 - USU1 - SEE
2 - USU2 - SEE
3 - USU3 - SEE
In the JSP I am saving the id inside an input hidden.
<input type="hidden" value="${operador.id }" name="idOperador"/>
In Java I call this value through
int id = Integer.parseInt(request.getParameter("idOperador"));
However, regardless of the item I click on "SEE", it is taking the value of the first row of the table . In this case the id "1" or the first of the next pages.
Any guidance?
Part of the code: This is inside a table, where one of the columns (actions) consists of the action buttons (view, change, and delete). When you select the change option, it is taking the id of the first row of the table.
Note: this is inside a foreach (JSTL)
<td class="actions">
<input type="hidden" value="${operador.id }" name="idOperador"/>
<div align="center">
<div class="btn-group" role="group">
<button type="button" class="btn bg-cyan waves-
effect">Visualizar</button>
<button type="submit" name="command" value="DadosAlterarOperador"
class="btn bg-cyan waves-effect">Alterar</button>
<button type="button" class="btn btn-danger waves-
effect">Excluir</button>
</div>
</div>
</td>