File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Pagination in JSP

 
Ram kanana
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Infact, You will find it being discussed in the JSp FAQ at PaginationOrPaging
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic