First of all, avoid java code inside jsp, it's a very old practice. Use jstl/custom tags etc. Now coming to your question, the table tag should come before the loop, its creating the table every time, in addition to this you seem to have an extra td tag.
James X Peterson
Whizlabs Java Support
posted 3 years ago
Hi supriya lal,
there is and extra TD tag remove it. try to place the table tag above the loop as it is creating the table for every iteration. Try to change these changes in your code and see the result.