protected void doGet(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 orders by user.
			case GetUserOrders: {
				int userId = Integer.parseInt(request.getParameter("uid")
						.toString().trim());
				outputJson = doGetUserOrders(userId);
				break;
			}
			// Get orders for user in event
			case GetEventUserOrders: {
				int userId = Integer.parseInt(request.getParameter("uid")
						.toString().trim());
				int eventId = Integer.parseInt(request.getParameter("eid")
						.toString().trim());
				outputJson = doGetUserOrders(userId, eventId);
				break;
			}
			// Get event orders
			case GetEventOrders: {
				int eventId = Integer.parseInt(request.getParameter("eid")
						.toString().trim());
				outputJson = doGetEventOrders(eventId);
				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);
	}