public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
CartActionForm cartForm = (CartActionForm) form;
Iterator cartItems = cartForm.getCart().getAllCartItems();
while (cartItems.hasNext()) {
CartItem cartItem = (CartItem) cartItems.next();
String itemId = cartItem.getItem().getItemId();
try {
int quantity = Integer.parseInt(request.getParameter(itemId));
cartForm.getCart().setQuantityByItemId(itemId, quantity);
if (quantity < 1) {
cartItems.remove();