Limiting c:foreach - pagination ?
843840Oct 18 2007 — edited Oct 18 2007Hello
In my servlet , I have a 2 d array which is stored as a session variable . This array could be very long, so I wish to display it in number of pages. In JSP, I use c:foreach to display the array. To have some sort of pagination effect, I need to display only first 10 rows of my array. and then the next page show the next and so on.
1. Could you please tell me how I can limit c:foreach in each page ?
So in page one I show 1-10
in page two I show 11-20
and so on.
2. Any other tips on how to best implement this feature is appreciated. (Note : array is not from database).
Thank you
Vajra
Edited by: Vajra1987 on Oct 18, 2007 1:47 AM
Edited by: Vajra1987 on Oct 18, 2007 9:14 AM