@RequestMapping("/additem.do") public ModelAndView addItem() { service.addItem(); ShoppingCart cart = service.getShoppingCart(); return new ModelAndView("/viewcart", SHOPPING_CART_KEY, cart); }
@RequestMapping("/viewcart.do") public ModelMap viewCart() { return new ModelMap(SHOPPING_CART_KEY, service.getShoppingCart()); }