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 |
What are the different access modifiers available in java?
What is entry in java?
Name and explain the types of ways which are used to pass arguments in any function in java.
What is parameter example?
What is clipping and repainting and what is the relation between them?
how can you catch multiple exceptions in java?
Explain differences between checked and unchecked exceptions in java?
without using arthematic operation ,how can you write the logic for adding/substraction/multiplication?
7 Answers Tanla Solutions, Wipro,
Explain public static void main(string args[]) in java.
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
Why string is a class?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)