Hi,
Unfortunately there is no such option in jsp. However using JDBC, you can
retrieve only a batch of rows instead of all the rows. The code is like this

int fetchSize = 10; // number of rows to take at a time
Statement st = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
st.setFetchSize(fetchSize);
cat.debug("sql: "+sql);
ResultSet rsScroll = st.executeQuery(sql);


then to retrieve a particular row

int r = 5; //the row to retrieve

boolean scrollResult = rsScroll.absolute(r);
if(scrollResult){
                        takeValues(rsScroll, false);
                        return true;
                }else
                        return false; //search has skipped eof

Regards,
Nagarajan.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Dick Wong
Sent: Friday, September 21, 2001 8:33 AM
To: [EMAIL PROTECTED]
Subject: How to set the PageSize in JSP ???


Dear all,

As I know that there is something like "PageSize" in asp to control how
many records to be retrieve in each page. How can I implement it on JSP ??
Any PageSize in JSP ?? As I want to do a result page with 10 records per
page.

Thanks for your help.

Regards,
   Dick Wong

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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

Reply via email to