• Post Reply Bookmark Topic Watch Topic
  • New Topic

paging in JSP

 
vikhyath kodipelli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have queries which return hundreds of records, i need to display 10 records at a time.with the option of choosing the page, something like
1|2|3|4|5 at the bottom.How can i do this in JSPs?.What are all the possible ways of doing it.
Please help,Thanks.
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This is a real query for me too.As the current project which i'm doing requires paging for a particular master.If u find anything bout it plz let me know,a request to all ranchers.
As far as i know there's no readymade paging as in ASP.
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vikhyath kodipelli:
I have queries which return hundreds of records, i need to display 10 records at a time.with the option of choosing the page, something like
1|2|3|4|5 at the bottom.How can i do this in JSPs?.What are all the possible ways of doing it.
Please help,Thanks.

Using JSTL's <c:forEach> iteration tag, which has attributes like 'begin' and 'end' to bound the interation, it's easy to implement most forms of paging.
We've made the examples from my book ("JSTL in Action") available for free online, and they show how to handle paging over any standard collection. You can download the examples from
   http://www.manning.com/bayern
by clicking "Source code" in the left column. The example for paging is listed under chapter 5.
Feel free to let me know if you've got any questions about it.
 
Joe Pardi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, check out the JSP grid control at http://www.dotjonline.com/taglib/grid.jsp
- good luck
 
Jyothi Lature
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this link:
http://jsptags.com/tags/navigation/pager/pager-taglib-1.1.html
U'll find a good example of taglibrary which does a similar job.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also one in the case study (chapter 11) of my book, Professional JSP Tag Libraries, the code examples from which can be downloaded from here.
Simon
[ July 23, 2002: Message edited by: Simon Brown ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!