private void doRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

        List<String> messages = new ArrayList<String>();
        List<String> errors = new ArrayList<String>();

        boolean help = false;

        String command = request.getParameter(PARAM_COMMAND);
        if (command == null || command.length() == 0) {
            help = true;
        } else {
            if (command.equalsIgnoreCase(MODE_HELP)) {
                help = true;
            } else if (command.equalsIgnoreCase(MODE_START)) {
                processCommandStart(request, messages);
            } else if (command.equalsIgnoreCase(MODE_STOP)) {
                processCommandStop(request, messages, errors);
            } else if (command.equalsIgnoreCase(MODE_REMOVE)) {
                processCommandRemove(request, messages, errors);
            } else if (command.equalsIgnoreCase(MODE_ADD)) {
                processCommandAdd(request, messages, errors);
            } else if (command.equalsIgnoreCase(MODE_SCHEDULE)) {
                processCommandSchedule(request, messages, errors);
            } else if (command.equalsIgnoreCase(MODE_KILL)) {
                processCommandKill(request, messages, errors);
            } else {
                help = true;
            }
        }

        createServletResponse(request, response, messages, errors, help);
    }