protected void service(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub

		String uri = getURI(request);
		request.setCharacterEncoding("UTF-8");

		// Room 관련
		if ("/comm/getAllRooms".equals(uri)) {
			getAllRooms(request, response);
		} else if ("/comm/regRoom".equals(uri)) {
			regRoom(request, response);
		} else if ("/comm/getRoomDetail".equals(uri)) {
			getRoomDetail(request, response);
		}

		// picture 관련

		// match 관련
		// else if ("/comm/getMatchResult".equals(uri)) {
		// getMatchResult(request, response);
		// }

		// deal 관련
		else if ("/comm/CompareWithRoom".equals(uri)) {
			// using MatchProc
			// filtering, ranking
			// sending data

				CompareWithRoom(request, response);
			
		}

		// User 관련
		else if ("/comm/regUser".equals(uri)) {
			regUser(request, response);
		} else if ("/comm/checkUser".equals(uri)) {
			checkUser(request, response);
		} else if ("/comm/UserLogin".equals(uri)) {
			// Login by DB
			try {
				UserLogin(request, response);
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} else {
			// set logger
			// logger = new Logger();
			// logger.log("Exception detected in 'ContentController'");
		}

	}