且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用嵌入式 Tomcat 检查 Tomcat 是否正在运行

更新时间:2023-01-17 21:28:34

您可以使用 Tomcat wiki 上提供的示例代码

You could use the example code given on the Tomcat wiki

http://wiki.apache.org/tomcat/HowTo#How_do_I_check_whether_Tomcat_There_is_UPF_or/a>

http://wiki.apache.org/tomcat/HowTo#How_do_I_check_whether_Tomcat_is_UP_or_DOWN.3F_There_is_no_status_command

注意:这不使用Embedded

它正在尝试连接到 Tomcat ip:port 并查看它是否响应.

It is trying to connect to the Tomcat ip:port and seeing if it responds.