With all that poorly formatted and unnecessary code, I cannot tell.
Please post again, showing only the code that's necessary to answer your question (how you are setting up the data in the servlet, and consuming it in the JSP) with proper formatting and indentation.
Why are you doing this:
Iterator<List> it=b.iterator();
Shouldn't be Iterator<Data> it = b.iterator?
What's b? Is not defined anywhere.
Why do you use the iterator for a list? why not to use just a for(Data myData: request.getAttribute("b"))?
And the most important question... why to use Java code in a JSP where you can use JSTL and EL and forget about iterators, casting, etc...?
hey guys thanks a lot for your suggestions..it seems that i need to learn a lot still..and i dont know JSTL...
I have changed my code a bit...this is my servlet called Simple.java
and in JSP i have made changes ....i am getting the values of the table but all 4 rows are having same value of the last row.....
How will I get all the values of all the rows..
my jsp Reading.jsp is as follows..it just displays the last row of my database table..I want all 4 rows ..it is displaying same values of the last row in all four rows of my table........