code: public void start(boolean rethrowExceptions) throws Exception
    {
      log.info("Starting up REST...");
  
      try
      {
        createWebServer();
        if (server == null)
        {
          isShutdownRequested = true;
          errorCode = 100;
        }
        else
        {
          server.start();
        }
      }
      catch (Exception ex)
      {
        log.error("could not start ANNIS REST service", ex);
        isShutdownRequested = true;
        errorCode = 100;
  
        if (rethrowExceptions)
        {
          if (!(ex instanceof AnnisException) && ex.getCause() instanceof AnnisException)
          {
            throw ((AnnisException) ex.getCause());
          }
          else
          {
            throw (ex);
          }
        }
      }
    }
docs: Creates and starts the server
  
  @param rethrowExceptions Set to true if you want to get exceptions
  re-thrown to parent