@Override
    protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
            throws ServletException, IOException {
        final String contextInfo = request.getContextPath();
        final String pathInfo = request.getPathInfo();
        System.out.println("get: " + contextInfo + " " + pathInfo + " " + request.getContentType());
        if (request.getContentType() == Constants.JSON_TYPE) {
            if (StringUtils.isEmpty(pathInfo)) {
                response.setContentType(Constants.JSON_TYPE);
                response.getWriter().print(JsonUtils.writeJsonArray(serverStatus.getGameInfoList()));
            } else if (GAMEID.matcher(pathInfo).matches()) {
                // list game waiting room
                final int gameId = Integer.parseInt(pathInfo.substring(6));
                System.out.println(gameId);

                if (serverStatus.containsGame(gameId)) {
                    final Game game = serverStatus.getGame(gameId);
                    final GameInfo info = game.getGameInfo();
                    response.setContentType(Constants.JSON_TYPE);
                    response.getWriter().print(JsonUtils.writeJsonObjectToString(info));
                } else {
                    response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                }

            } else {
                response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
            }
        } else {
                response.setContentType("text/html");
                response.getWriter().print(HTML_STRING);
            }
    }