tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Geery <>
Subject Re: [off topic] - passing a ResultSet from a servlet to a JSP
Date Tue, 29 Apr 2003 19:00:32 GMT
An easy way to do this "automagically" done for you is to use

See the RowSetDynaClass JavaDoc API at
which also explains exactly how to use it.

Note that you will need to download the beanutils package, extract the 
beanutils jar and put it where your application can find it. You can get 
the package from

[The commons-beanutils.jar is included as part of Tomcat in the 
$CATALINA_HOME/server/lib directory, but due to the way the classloaders 
work, your application won't be able to see it. If you want to just use 
this jar, you'll need to copy it to a location where your application 
can see it.]


>Don't send ResultSets around.  Instead, have the servlets loop through
>the result set and create whatever object you need to hold the result
>set's contents.  Then close and discard the result set (and statement,
>and connection to the db, etc, all in a finally {} block or whatever to
>ensure they execute blah blah blah).  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message