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