Hi,
One of the simple ways is to store the resultset data in a vector of hashtables.. i.e each entry in the vector (hashtable) represents a row.. the entries in the hashtable itself are a key value pair of the form column_name = column_value... I hope you see the picture.. i guess you would be doing the database operations in a
servlet or bean.. now you attach this vector to the request object as an attribute and forward it to the jsp page.. you can retreive it and dispaly on the jsp..
However there certainly might be better ways to do all this such as maybe a HashMap etc.. but then thats for you to find out..
Subbu
Originally posted by jay Rotti:
Hi,
I have a Java Beans which gets result set object. For simplicity I am getting same resultset object to JSP page. I know this is costly affair with connection being open.
I need simple and clean solution to replace this logic.
I have 100 records with 10 columns each.
I know bit about hashtabel, arraylist But I don't know how to store rows and columns and how to fetch them back.
any help appreciated.
thanks
[This message has been edited by subramaniam vaidyanathan (edited June 25, 2001).]