Jonathan
 
A way of doing this is to use the java.util.ArrayList object. If you have a bean to represent a row of data eg
 
TableRow
CustID        FirstName    LastName
 
RowBean
 
Integer CustId; /* with get and set Methods */
String FirstName;/* with get and set Methods */
String LastName;/* with get and set Methods */
 
In your action perform, you can loop through your resultset, create a new RowBean for each Row and add it to the arraylist. You can then either assign the arraylist to the response object or the session object. In your JSP page, use the iterate tag to loop through your list.
 
The other option is to use the CacheResultSet from sun but I have not venture into that area. There are a number of discussions in this list about using the CacheResultSet.
 
Regards
 
Michael Mok
 
 
-----Original Message-----
From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 June 2001 10:09
To: [EMAIL PROTECTED]
Subject: Displaying data retrieved from a database

I was interested in how you all were displaying data retrieved from a database.  My notion is that in your Actions perform() method you will make calls and get results.  But where do you put the results?  Do I save the data to a bean which I pass in the request to a waiting Tag class on the page I will forward to, and have that Tag class iterate through the beans data? This means I have to make Tag classes to read in passed beans.
 
How are you all doing this in general.  I am very interested.
 
Jonathan

Reply via email to