Wait until tomcat finishes starting up

前端 未结 8 2211
囚心锁ツ
囚心锁ツ 2020-12-24 13:29

I have a script that needs to run after tomcat has finished starting up and is ready to start deploying applications. I\'m using $TOMCAT_HOME/bin/startup.sh whi

8条回答
  •  醉话见心
    2020-12-24 13:47

    Depends on what you mean by finishing. What do you want to wait for?

    You could, for example, have a script that hits a URL repeatedly until it gets a desirable result that would only be available once the app is properly initialized.

    You could also have a context listener that writes out an "I'm ready" file that you use to signal the readiness of your application. (If you do this, be sure the file doesn't exist before starting your app container).

提交回复
热议问题