I have 100 records in a table with two rows. I need to
display 10 records per page like Google Search. I need only
the Logic(Pagination) in Pure Java. No JSP and all..Thanks
in Advance...
Answer Posted / avani
String strPageNum = request.getParameter(“pageNum”);
int pageNum = 0;
if(strPageNum != null){
pageNum = new Integer(strPageNum).intValue();
}
int maxRowsPerPage = new Integer(request.getParameter
(“rowsPerPage”)).intValue();
//calculate
int rowEnd = pageNum * maxRowsPerPage;
int rowStart = (rowEnd - maxRowsPerPage) + 1;
| Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
Which is fastest collection in java?
Garbage collection in java?
How do you achieve polymorphism in java?
What are the benefits of operations in java?
What are the different types of java?
Is java a virus?
What is integer size in java?
Can a class have multiple superclasses?
what is the use of bean managed and container managed with example?
How does regex work?
What are the basic interfaces of java collections framework?
What is the use of conditional statement?
When arithmeticexception is thrown?
What is the purpose of static methods and variables?
What is the use of arrays tostring () in java?