code: private void doStop() throws LifecycleException {
          logger.info("Stopping tomcat.");
          long startTime = System.currentTimeMillis();
          tomcat.stop();
          long duration = System.currentTimeMillis() - startTime;
          logger.info("Tomcat shutdown finished in " + duration + " ms.");
      }
docs: Stops the embedded tomcat.
  
  @throws LifecycleException if tomcat failed to stop