public static String deleteFromCart(HttpServletRequest request,HttpServletResponse response){
  ShoppingCart cart=getCartObject(request);
  LocalDispatcher dispatcher=(LocalDispatcher)request.getAttribute("dispatcher");
  ShoppingCartHelper cartHelper=new ShoppingCartHelper(null,dispatcher,cart);
  String controlDirective;
  Map<String,Object> result;
  Map<String,Object> paramMap=UtilHttp.getParameterMap(request);
  result=cartHelper.deleteFromCart(paramMap);
  controlDirective=processResult(result,request);
  if (controlDirective.equals(ERROR)) {
    return "error";
  }
 else {
    return "success";
  }
}

public static String deleteFromCart ( HttpServletRequest request , HttpServletResponse response ) { ShoppingCart cart = getCartObject ( request ) ; LocalDispatcher dispatcher = ( LocalDispatcher ) request . getAttribute ( "dispatcher" ) ; ShoppingCartHelper cartHelper = new ShoppingCartHelper ( null , dispatcher , cart ) ; String controlDirective ; Map < String , Object > result ; Map < String , Object > paramMap = UtilHttp . getParameterMap ( request ) ; result = cartHelper . deleteFromCart ( paramMap ) ; controlDirective = processResult ( result , request ) ; if ( controlDirective . equals ( ERROR ) ) { return "error" ; } else { return "success" ; } }
delete an item from the shopping cart .
