I am not sure without, but I would say the error is with the following line:
for (int j = 1; request.getParameter((j==1)?"Ac.code":("Ac.code_" +j)) != null; j++) {
What is this line for?
Is one of the parameters the number of records to be added, if so when you pass 2 you will loop twice, if you pass 3 you will loop 3 times.
Perhaps your while loop should be inside this one?
Like I say am not sure just by looking at this code, but am pretty sure the problem is with one of your loops.
|