I have a table that dynamically generates values from my database. The list variable is an arrayList of some Object
 <table border="1">
                     <tr>
                        <th>Username</th>
                        <th>Full Name</th>
                        <th>Status</th>
                        <th>Action</th>
                     </tr>
                        <%for(int x = 0; x <list.size(); x++) {%>
                        <tr>
                        <td><% out.println(list.get(x).getUsername()); %></td>
                        <td><%out.println(list.get(x).getFirstname() + list.get(x).getMiddleinitial() + list.get(x).getLastname());%></td>
                         <td><% out.println(list.get(x).getStatus()); %></td>
                          <td> 
                              <form action="ViewManager" method="POST">
                                   <input id="button" type="submit" value="View" >
                              </form>
                              <form action="LockManager" method="POST">
                                   <input id="button" type="submit" value="Lock" >
                              </form>
                              <form action="DeleteManager" method="POST">
                                   <input id="button" type="submit" value="Delete" >
                              </form>
                          </td>
                        </tr>
                        <% }%>
                    </table>
What I want is to capture the username of the certain row in where I pressed the button and pass it to a servlet.
 
     
     
    