i would like to use jsp and java to write a add/edit/delete function.

I am a beginner, now i dont know how to create a java as a database layer in which i connect to database and write sql statement to insert/delete/update the table.

afterwards, i would like to use jsp to create a layout.

now , I don't know how to check the checkbox value from the table and then the user click the delete button to delete all ticked record in the table.

I already write the code in jsp as belows:

<INPUT TYPE="submit" value="Delete" onClick="">
while(rs.next())
{
%>
<tr><td><%=rs.getString(1) %></td>
<td><%=rs.getString(2) %></td>
<td><%=rs.getString(3) %></td>
<td><center><input type="checkbox" name="del" ></center></td></tr>


<%