FileDocCategorySizeDatePackage
RemoveItemFromCartController.javaAPI DocExample836Thu Dec 04 08:19:26 GMT 2003org.springframework.samples.jpetstore.web.spring

RemoveItemFromCartController

public class RemoveItemFromCartController extends Object implements org.springframework.web.servlet.mvc.Controller
author
Juergen Hoeller
since
30.11.2003

Fields Summary
Constructors Summary
Methods Summary
public org.springframework.web.servlet.ModelAndViewhandleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

		Cart cart = (Cart) WebUtils.getOrCreateSessionAttribute(request, "sessionCart", Cart.class);
		cart.removeItemById(request.getParameter("workingItemId"));
		return new ModelAndView("Cart", "cart", cart);