protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		String outputJson = "";
		PrintWriter out = response.getWriter();
		try {
			String method = request.getParameter("method").toLowerCase(
					Locale.ENGLISH);
			switch (CommandType.convertFormString(method)) {
			// Get a new group
			case CreateOrders: {
				boolean result;
				String orderListJsonStr = request.getParameter("orders")
						.toString().trim();
				int userId = Integer.parseInt(request.getParameter("uid")
						.toString().trim());
				int eventId = Integer.parseInt(request.getParameter("eid")
						.toString().trim());
				if (orderListJsonStr == "") {
					result = false;
				} else {
					Type ordersType = new TypeToken<List<OrderInfo>>() {
					}.getType();
					List<OrderInfo> orders = Gson.fromJson(orderListJsonStr,
							ordersType);
					if (orders.size() > 0) {
						result = OrderDAO.createOrders(orders, eventId, userId);
					} else {
						result = false;
					}
				}
				CommonObjectWrapper jsonResult = new CommonObjectWrapper();
				String message = ("success to create a new orders");
				if (!result) {
					message = "Excpetion occurs, failed to ceate new orders";
				}
				jsonResult.setStatus(result);
				jsonResult.setMessage(message);
				outputJson = Gson.toJson(jsonResult);
				break;
			}
			// Update order status
			case UpdateOrderStatus: {
				boolean result;
				int orderId = Integer.parseInt(request.getParameter("oid")
						.toString().trim());
				int statusCode = Integer.parseInt(request
						.getParameter("status").toString().trim());
				result = OrderDAO.updateOrderStatus(orderId, statusCode);
				CommonObjectWrapper jsonResult = new CommonObjectWrapper();
				String message = ("success to update the order status");
				if (!result) {
					message = "Excpetion occurs, failed to update the order status";
				}
				jsonResult.setStatus(result);
				jsonResult.setMessage(message);
				outputJson = Gson.toJson(jsonResult);
				break;
			}
			default: {
				break;
			}
			}
		} catch (Exception ex) {
			AppLogger.error(ex);
			CommonObjectWrapper jsonResult = handlerException(ex.toString());
			outputJson = Gson.toJson(jsonResult);
		}
		response.setContentType("application/json");
		response.setCharacterEncoding("utf-8");
		out.print(outputJson);
	}