• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp Paging  RSS feed

 
Sarthak Kanungo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using a sql querry to retrive the rows of data from the database.I want that data to be displayed in various pages that is if the number of rows is greater than 10,it will show previous,1,2,3,next hyperlinks.When the user clicks "next" hyperlink in the main page another 10 row of data is to be displayed in another page.Likewise when 100 rows will be there then it is displayed in 10 pages, 10 rows per page and all the pages contains links to previous and next pages.please give me details with how to implement it with source code.
 
Chetan Pandey
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi :

Use the displaytag Taglib from
displaytag.sourceforge.net/

It has all you need and much more.

This is an example of using it - after you have got the JAR File and all
<!-- Tag Lib directive -->


where requestScope.billItemsList is a MAP-List-primitive array of beans etc and has been put in the requestScope.

It will give you not only pagination that you are looking at but also automatic sorting, downloading - as CSV, pdf, EXCEL, html - and many more things you can explore from the Website.

Chetan
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to check the JSP FAQ to see if your question has already been addressed.
 
Sarthak Kanungo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please give me the clear and brief coding of the jsp paging?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read the FAQ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!