protected void doGet(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		JSONObject jb = new JSONObject();
		String userId = request.getParameter("userId");
		try{
			connection = new Mongo();
			scheduleDB = connection.getDB("schedule");
			groupCollection = scheduleDB.getCollection("group_" + userId);

			DBCursor cur = groupCollection.find();
			JSONArray ja = new JSONArray();
			while(cur.hasNext()){
				//ja.add(cur.next());
				JSONObject groupJSONObject= new JSONObject();
				DBObject dbo = cur.next();
				String id = dbo.get("_id").toString();
				String groupName = (String)dbo.get("groupName");
				groupJSONObject.put("_id", id);
				groupJSONObject.put("groupName", groupName);
				ja.add(groupJSONObject);
			}
			jb.put("result", Primitive.ACCEPT);
			jb.put("groupList",ja);
			
		}catch(MongoException e){
			jb.put("result", Primitive.DBCONNECTIONERROR);
		   	e.printStackTrace();
		}
		PrintWriter writer = response.getWriter();
		writer.write(jb.toString());
		writer.flush();
		writer.close();
	}