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
|
- Displaying data retrieved from a database Jonathan Asbell
- RE: Displaying data retrieved from a database Michael Mok
- RE: Displaying data retrieved from a database Luna, Kat
- Re: Displaying data retrieved from a database William Jaynes
- Re: Displaying data retrieved from a database Michael Mok
- RE: Displaying data retrieved from a database Luna, Kat