protected void doGet(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		JSONObject jb = new JSONObject();
		String userId = request.getParameter("userId");
		String eventName = new String(
				request.getParameter("eventName").getBytes("ISO-8859-1"),"UTF-8"); 
		String calFrom = request.getParameter("calFrom");
		String calTo = request.getParameter("calTo");
		String locationName = new String(
				request.getParameter("locationName").getBytes("ISO-8859-1"),"UTF-8");
		String locationCoordinate = new String(
				request.getParameter("locationCoordinate").getBytes("ISO-8859-1"),"UTF-8");
		String decription = new String(
				request.getParameter("decription").getBytes("ISO-8859-1"),"UTF-8"); 
		String updateTime = request.getParameter("updateTime");
		String targetGroup = request.getParameter("targetGroup");
		try{
			connection = new Mongo();
			scheduleDB = connection.getDB("schedule");
			eventCollection = scheduleDB.getCollection("event_"+userId);
			WriteResult writeResult;
			DBObject event = new BasicDBObject();
			//event.put("userId", userId);
			event.put("eventName", eventName);
			Date dateFrom = new Date();
			Date dateTo = new Date();
			dateFrom.setTime(Long.parseLong(calFrom));
			dateTo.setTime(Long.parseLong(calTo));
			event.put("calFrom", dateFrom);
			event.put("calTo", dateTo);
			event.put("locationName", locationName);
			event.put("locationCoordinate", locationCoordinate);
			event.put("decription", decription);
			event.put("photo", "null");
			event.put("record", "null");
			event.put("commentCount", 0);
			event.put("updateTime", updateTime);
			event.put("targetGroup", targetGroup);

			writeResult = eventCollection.save(event);
			int N = writeResult.getN();
			DBCollection groupCollection = scheduleDB.getCollection("group_"+userId);
			DBObject groupQuery = new BasicDBObject();
			groupQuery.put("_id", new ObjectId(targetGroup));
			DBCursor cur = groupCollection.find(groupQuery);
			while(cur.hasNext()){
				JSONObject eventJSONObject= new JSONObject();
				DBObject dbo = cur.next();
				ArrayList<String> members= new ArrayList();
				try{
					members = (ArrayList<String>)dbo.get("member");	
					for(int i = 0; i<members.size(); i++){	
						DBCollection socialCollection = 
							scheduleDB.getCollection("social_"+members.get(i));
						DBObject socialEvent = new BasicDBObject();
						socialEvent.put("eventId", event.get("_id").toString());
						socialEvent.put("userId", userId);
						socialEvent.put("updateTime", updateTime);
						WriteResult wr2 = socialCollection.save(socialEvent);
						if(wr2.getN() != 0 ){
							jb.put("result", Primitive.DBSTOREERROR);
						}
					}
				}catch(Exception e){
					
				}
			}
			if(N != 0 ){
				jb.put("result", Primitive.DBSTOREERROR);
			}else{
				jb.put("result", Primitive.ACCEPT);
			}
			
		}catch(MongoException e){
			jb.put("result", Primitive.DBCONNECTIONERROR);
		   	e.printStackTrace();
		}
		PrintWriter writer = response.getWriter();
		writer.write(jb.toString());
		writer.flush();
		writer.close();
		
	}