I would never use that approach ;-)
If you store the ResultSet in a session you also need to store the
Connection in that session.
Since, when you close the connection, the ResultSet is closed as well.
The only way to close that ResultSet and Connection is by implementing the
SessionBindingListener interface. But then most connections will be closed
(or returned to the pool) by a timeout.
This can results in a very large number of open connections and resultsets
(depending on how successful your site is ;-) and put considerable load on
the server.
Unless you're serving a small audience (like an intranet application with
only a few users) I would use this technique.
Geert 'Darling' Van Damme
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Nathan Hoover
> Sent: donderdag 11 mei 2000 14:55
> To: [EMAIL PROTECTED]
> Subject: Re: jsp to oracle technique: paging display of large recordsets
>
>
> Basically your best bet would be to stuff your ResultSet into and
> HTTPSession object. Then, you could rs.next() 20 times, then the
> user cuold
> click next, and you would still have the recordset around, and the process
> could repeat itself.
>
> N
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Edmister
> Sent: Wednesday, May 10, 2000 8:28 PM
> To: [EMAIL PROTECTED]
> Subject: jsp to oracle technique: paging display of large recordsets
>
>
> i'm somewhat new to jsp and oracle but i need a solution that allows me to
> grab only "n" number of records at a time from a "large resultset" for
> display purposes.
>
> for example, i query and get 200 records but i want to display
> (forward and
> backward OR next and previous) 10 (or n number of records) on each page.
>
> i've accomplished this in cold fusion to any RDMS but it's horrible b/c it
> has to process the entire query each time you click Next or Prev. and then
> you filter the group of records you want. i'm assuming that since the jsp
> drivers are basically a subset of the JDBC API i might not have that much
> for a solution (? don't know). also, i'm assuming that an Oracle
> cursor can
> be used but might not be the best approach if "caching" is an issue.
>
> so, any solutions or techniques for doing this cleanly would be GREATLY
> appreciated. either JSP or Oracle as a solution will do fine but let me
> know the downsides too.
>
> much appreciated on any response.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets