Wait for Tomcat to shut down