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...
Answers were Sorted based on User's Feedback
Answer / 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 |
Difference between java and javascript
Why do we need hashmap in java?
Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx
How do you check if a string is lexicographically in java?
What is the nested interface?
What is the use of protected in java?
What is user defined exception?
What is the different between get and post?
What is the use of parseint in java?
What are the three parts of a lambda expression? What is the type of lambda expression?
How can we make a class singleton?
What is an example of declaration?