Restart tomcat through webapp

后端 未结 3 1847
眼角桃花
眼角桃花 2021-01-14 05:13

I have a crazy request about restarting tomcat server through my webapp. I was searching for nearly 2 days about this and all i found are executing external batch file or ca

3条回答
  •  日久生厌
    2021-01-14 05:42

    Why not just create a script an call it trough Runtime.exec? Seems quite optimal to me. Since restarting tomcat will terminate the Java VM, it doesn't really make sense to have it as an API call.

提交回复
热议问题