Well first off, you might get more of response if this was placed in the
Servlet/JSP forum.
If you took the long way. I would recommend you look into
struts. If you want to take the short route.
I would first put my database logic in a java bean, create a
servlet to handle the request(s) i.e."Add Row" from your JSP page, use the java bean inside the servlet to update the database with data stored in the request object from your JSP page.
I hope I understand your question.