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.
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
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.
U'll find a good example of taglibrary which does a similar job.