	private void confirmArrivalToConf(HttpServletRequest request, HttpServletResponse response) throws Exception {
		JsonObject jsonObject = new JsonObject();
		String userIdstr = request.getParameter(ProjConst.USER_ID);
		String confName = request.getParameter(ProjConst.COMP_NAME);
		String answer =  request.getParameter(ProjConst.COMP_NAME);
		Long userId;
		boolean success;
		if ( userIdstr == null) {
			throw new Exception("Failed to get user id");
		}else{
			userId = Long.valueOf(userIdstr.trim());
		}
		if ( confName == null) {
			throw new Exception("Failed to get conference name");
		}
		if ( answer == null) {
			throw new Exception("Failed to get user's answer");
		}
    	String message;
    	try 
    	{
    		User user = UserDao.getInstance().getUserById(userId);
    		Conference conf = ConferenceDao.getInstance().getConferenceByName(confName);
    		ConferencesUsersDao.getInstance().updateUserAttendanceApproval(conf, user, UserAttendanceStatus.valueOf(answer));
    		message = "response successfully updated";
    		success = true;
    	}
    	catch (Exception e)
    	{
    		message = "Error occurred, unable to update response";
    		success = false;
    	}
    	response.setContentType("application/json;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            Gson gson = new Gson();
           	String json;
           	if (success)	
           	{
           		jsonObject.addProperty("resultSuccess", "true");
           		jsonObject.addProperty("message", message);
           		json = gson.toJson(jsonObject);
           	}
           	else
           	{
           		jsonObject.addProperty("resultSuccess", "false");
           		jsonObject.addProperty("message", message);
           		json = gson.toJson(jsonObject);
           	}
           	out.write(json);
            out.flush();
        }
         finally {
            out.close();
        }
	}

	private void confirmArrivalToConf(HttpServletRequest request, HttpServletResponse response) throws Exception {
		JsonObject jsonObject = new JsonObject();
		String userIdstr = request.getParameter(ProjConst.USER_ID);
		String confName = request.getParameter(ProjConst.CONF_NAME);
		String answer =  request.getParameter("answer");
		Long userId;
		boolean success;
		if ( userIdstr == null) {
			throw new Exception("Failed to get user id");
		}else{
			userId = Long.valueOf(userIdstr.trim());
		}
		if ( confName == null) {
			throw new Exception("Failed to get conference name");
		}
		if ( answer == null) {
			throw new Exception("Failed to get user's answer");
		}
    	String message;
    	try 
    	{
    		User user = UserDao.getInstance().getUserById(userId);
    		Conference conf = ConferenceDao.getInstance().getConferenceByName(confName);
    		ConferencesUsersDao.getInstance().updateUserAttendanceApproval(conf, user, UserAttendanceStatus.valueOf(answer));
    		message = "response successfully updated";
    		success = true;
    	}
    	catch (Exception e)
    	{
    		message = "Error occurred, unable to update response";
    		success = false;
    	}
    	response.setContentType("application/json;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            Gson gson = new Gson();
           	String json;
           	if (success)	
           	{
           		jsonObject.addProperty("resultSuccess", "true");
           		jsonObject.addProperty("message", message);
           		json = gson.toJson(jsonObject);
           	}
           	else
           	{
           		jsonObject.addProperty("resultSuccess", "false");
           		jsonObject.addProperty("message", message);
           		json = gson.toJson(jsonObject);
           	}
           	out.write(json);
            out.flush();
        }
         finally {
            out.close();
        }
	}
