Reputation: 88
I am using Spring MVC 3.0 and I have part of code given below:
@RequestMapping("/viewAllEmployee")
public ModelAndView getAllEmployee()
{
ModelAndView mav=new ModelAndView("showEmployee");
List<Employee> employee= employeeDAO.getAllEmployees();
mav.addObject("RESULT_EMPLOYEE", employee);
return mav;
}
Now, My problem is that suppose the result given by above code is 20, so, I want the result to be displayed 5 at a time in JSP so, that when user clicks next, next 5 result is displayed. How can I do this.
Thanks
Upvotes: 0
Views: 266
Reputation: 3764
You can use displaytag, please take a look here: http://www.displaytag.org/1.2/
With this element you can show your lists in your jsp pages, perform pagination, ordering, exporting, etc.
Upvotes: 1