Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Limiting c:foreach - pagination ?

843840Oct 18 2007 — edited Oct 18 2007
Hello

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2007
Added on Oct 18 2007
1 comment
346 views