The first thing you need to do is to get all data (rows) which you want to insert into your servlet.
For example on JSP each row has two text box which can be updated.
1. First Name
2. Surname
Now in the JSP make sure that the name of name and the surname text box is same for each row .Doing so you would be left with two arrays of text box. One for name and one for surname.
On the Servlet
use
String[] name = request.getParameterValues("name");
String[] surname = request.getParameterValues("surname")
Emolyee emp = null; // Mabe a bean which have getter and setter for name and surname
ArralList list = new ArrayList();
for(int i = 0 ;i<name.lenght;i++) {
emp = new Employee();
emp.setName(name[i]);
emp.setSurname(surname[i]);
list.add(emp);
}
Now pass this list to you database class.
There loop through the list and make dynamic insert statements
like
for(int k = 0;k<list.size();k++) {
insert into emp values(list.get(k).getName(),list.get(k).getName())
}