1 package org.objectweb.petals.demo.icare.web; 2 3 import javax.servlet.ServletException ; 4 import javax.servlet.http.HttpServletRequest ; 5 import javax.servlet.http.HttpServletResponse ; 6 7 import org.objectweb.petals.demo.icare.service.CarService; 8 import org.springframework.web.servlet.ModelAndView; 9 import org.springframework.web.servlet.mvc.AbstractController; 10 11 19 public class ReservationsListController extends AbstractController{ 20 private CarService carService; 21 22 public CarService getCarService() { 23 return carService; 24 } 25 26 public void setCarService(CarService carService) { 27 this.carService = carService; 28 } 29 30 38 @Override 39 protected ModelAndView handleRequestInternal(HttpServletRequest arg0, 40 HttpServletResponse arg1) throws Exception { 41 return new ModelAndView("reservationsList", "reservations", 42 getCarService().getAllReservations()); 43 } 44 45 } 46 | Popular Tags |