File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes About Pagination in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "About Pagination in JSP" Watch "About Pagination in JSP" New topic
Author

About Pagination in JSP

Ram kanana
Ranch Hand

Joined: Apr 13, 2006
Posts: 34
i have nearly 1000 records, and i paginate with my own code in that i retriew all the records(1000) from database and stored in a session. And finally show page wise with 10 records per page.

But i found another way, instead of getting whole records from the database retriew particular data for the page and when click next page it gets the particular data from the database.

Which way is better or what is proper way for feasibility and quick response. Because the first one make time consuming
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

There are many good ways of doing pagination. And it's been discussed here on many occasions. A search in the JSP forum will show you past discussions. I can tell you right now that putting 1000 records worth of data in the session is usually not a good idea.


GenRocket - Experts at Building Test Data
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Infact, You will find it being discussed in the JSp FAQ at PaginationOrPaging


[My Blog] [JavaRanch Journal]
 
GeeCON Prague 2014
 
subject: About Pagination in JSP