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 groups by query
			case GetGroupByQuery: {
				String queryStr = request.getParameter("q").toString().trim();
				outputJson = doGetGroupByQuery(queryStr);
				break;
			}
			// Get groups by user
			case GetGroupsByUser: {
				int userId = Integer.parseInt(request.getParameter("uid")
						.toString().trim());
				outputJson = doGetGroupsByUser(userId);
				break;
			}
			// Get groups members
			case GetGroupMembers: {
				int groupId = Integer.parseInt(request.getParameter("gid")
						.toString().trim());
				outputJson = doGetGroupMembers(groupId);
				break;
			}
			case GetGroupMemebersByStatus: {
				int groupId = Integer.parseInt(request.getParameter("gid")
						.toString().trim());
				int statusCode = Integer.parseInt(request
						.getParameter("status").toString().trim());
				outputJson = doGetGroupMembers(groupId, statusCode);
				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);
	}