How to judge whether the web application of tomcat has been started or not?

is there any way to know clearly whether the service in tomcat has been started and completed?
because the tomcat will first occupy the port when it starts, but the service of the corresponding port has not been fully started when the tomcat occupies the port. At this time, the access service will report 4xx

.
Mar.25,2021

you can check log

tail -f logs/catalina.out

shows that most of these are successful

INFO: Server startup in 77037 ms

send a simple curl request to see if it is returned successfully?


there are several general ideas:
1, use the grep command to find the startup log in catalina.out
2, set a heartbeat interface, use curl to see if you can access
3, integrate a service registration and discovery service
4, port 8005 defaults to the service connection port, see if this port of tomcat is open, during the startup process, this port cannot be connected.

Menu