• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

paging in JSP

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, check out the JSP grid control at http://www.dotjonline.com/taglib/grid.jsp
- good luck
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic