This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 9915
    
158

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


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Pagination in JSP
 
Similar Threads
Retriew the values from the database using Struts2.
Getting random records
passing parameters between servlets and applets
Selecting random records
Display datas on Jsp Page from the Database