protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		User user = (User) request.getSession().getAttribute("user");
		try {
            String shipping = request.getParameter("shippingInfo");
            String addressNick = request.getParameter("addressNickame");
            String creditNick = request.getParameter("creditNickname");
            System.out.println(addressNick);
            if((shipping == null || shipping.isEmpty()) || 
               (addressNick == null || addressNick.isEmpty()) || 
               (creditNick == null || creditNick.isEmpty())){
                String redirectURL = response.encodeRedirectURL("cart.jsp?error=Missing Input Field");
                response.sendRedirect(redirectURL);
                return;
            }
			UserProcedures.checkOut(user, user.getCart(), shipping, addressNick, creditNick);

			user.resetCart();
			response.sendRedirect("proposals.jsp");
		} catch (SQLException e) {
			response.sendRedirect("error.jsp?error=" + e);
			e.printStackTrace();
		} catch (CommitOrderException e) {
            String redirectURL = response.encodeRedirectURL("cart.jsp?error=" + e.getMessage());
			response.sendRedirect(redirectURL);
			e.printStackTrace();
		} catch (Exception e) {
			response.sendRedirect("error.jsp?error=" + e);
			e.printStackTrace();
		}
	}