コード例 #1
0
 @RequestMapping(path = "updateEmployee.do", method = RequestMethod.GET)
 public ModelAndView updateEmployeeForm() {
   ModelAndView mv = new ModelAndView();
   mv.setViewName("delete.jsp");
   mv.addObject("employees", dao.listAllEmployees());
   return mv;
 }
コード例 #2
0
  @RequestMapping(path = "allEmployees.do", method = RequestMethod.GET)
  public ModelAndView allEmployees() {
    ArrayList<Employee> emp = dao.listAllEmployees();

    ModelAndView mv = new ModelAndView();
    mv.setViewName("employees.jsp");
    mv.addObject("employees", emp);

    return mv;
  }