hi ,i am a jsp application but the problem is that the how do i control the number of search results if it is too many for a page for example if the a query on web application produces like 30 search results and i need 10 per page how do i do that could i get some code on how to do that thank you
--One learns a lot during a lesson but seeing is not enough,you must do;knowing is not enough ,you must apply--<br />SCJP 1.4,SCBCD,SCEA part 1,OCM JEE Enterprise Architect.
chinedu, this is a commonly asked question. You can probably find some great ideas or a starting point by search this forum (as well as perhaps the Servlets and JDBC forums) for terms such as "paging" and "search results". bear
Hello.. its very simple.. and more of logic then jsp question .. let's say query is select id , name from atable; this will fetch 100 records save this records in the arraylist .. i.e id [primary key] so total no. of records is 100 records per page = 10 total no. of page = 10 now u have to show page1 first... for others show links 2,3,4 5,6,7,8,9,10 1 is inactive as we are showing first page.. now when there is a code of showing the records make a loop of 1 - 10 now when user click on 2 u are to display 11-20 so for start and end condition of the loop to display the records from the arraylist write small code i.e equation to get start and end condition depending on page number u are done vijay