How to Dispaly databsae records in my jsp page using collections Java Class
For getting records from database to java collections you want to do following steps. 1.Declare the ResultSet variable resultset 2.execute the query for retrieving result and store it in resultset 3.put the loop if(resultset.next()) 4.Create object for class where you want to store and set data 5.after closing the loop put the class object inside Collection object(Collection object should already declared). 6.return that collection object.
then in your j.s.p page 1.call the function which returning collection object 2.Assign tht function to another collection object 3.put the for loop by incrementing 'int i' value upto collection object size. 4.call get(i) and you will get the values.