Hello Friends, I have got a lot of records to display. Instead of displaying them all at once I want to display 20 records per page. Please suggest me way to accomplish this and if possible provide snippet regarding this. Thanks in advance.
Hello Friends, Thanks for ur responses. But It didn't answered my question. Is there any command in Java that accomplishes displaying only a certain portion of ResultSet [0-20,20-40 records and so on]? Whether I must write my own coding to skip the unnecessary records and to reach the necessary records range? JavaRanch displayed pagenumbers such as 1>>2>>3>>..... and showed only certain messages(posts)in a webpage. I want similar approach in displaying ResultSet contents in my application. Can JavaRanch people help me in accomplishing this.
I am using below mention code to solve that kind of problem in my project and it's working properly TRY TO UNDERSTAND THIS CODE __________________________________ First declare one integer:- int start=0; __________________________________ when you print the user values just increment the value of this int:- out.println("<tr><td>"+(start+(noOfComp++))+"</td><td>"+job+"</td></tr> __________________________________ put this code with result set:- for(int i=0;i<start;i++) rs.next(); int noOfComp=1; if(rs.next()) ___________________________________ and put this code where you want to give link on next page:- if(noOfComp>10) break; }while (rs.next()); if((start+noOfComp-1)<count) out.println("<TR><td colspan=6><a href=page5.jsp?start="+(start+noOfComp-1)+">Next Page</a></td></tr>"); } ____________________________________ ALL THE BEST