Hi I am new to struts..... I ve used the basic tags like <logic:iterate>,<logic:equal>,<logic resent> I don't know how to do paging in struts. I ve 1000 records, I need to display 20 records at a time... then i should click next button to move to next twenty records. I also need first, next, prev, last buttons that display its corresponding records. Can anyone send me sample code for this..... Please send it immediately... Thank you..
You can query the database to retreive the records that you need to be dispalyed in the jsp and show it. For eg. if you are in page 2 and number recoreds displayed per page is 10 then you need to fetch only records from 11 to 20. Then set this list in the form and display it using logic:iterate. If your database is db2 then its very simple you can use rownumber function to retreive the records you want. The other way is fetch all the data, and forming the sublist that needs to be displayed in java.