This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Pagination in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pagination in Struts" Watch "Pagination in Struts" New topic
Author

Pagination in Struts

Christian Nash
Ranch Hand

Joined: Jan 17, 2006
Posts: 107
Hi all,

If any of you can help me with the pagination with the help of an example it would be great. Here is what i want:

When my jsp loads the first time it already has a list of 5 people(max 5 people per page).On this page i have the "previous" and "next" buttons.when i click the next button i would like to go to the database through the Action class and get the next five results.Same with the "previous" button.
I have tried to use the pagination tags but its been of no help.

Cheers,
ashwin.


- Christian
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There are no pagination tags in standard Struts. There is a separate tag library called Struts-layout that does have some pagination features. Pagination in Struts has been discussed in many other threads in this forum. Click the search link, specify the Struts forum, and enter "pagination" and you will see a number of them. This thread is one of them.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Pagination in Struts