The purpose is to:
1: connect to a remote server maybe via host: ip , port: 8181
2: stop Tomcat that's running on that server
3: deploy a .war file
4: restart tomcat
1: connect to a remote server maybe via host: ip , port: 8181
2: stop Tomcat that's running on that server
3: deploy a .war file
4: restart tomcat
I believe Tomcat Documentation under Monitoring and Managing Tomcat offers some information on how to stop a given application, but not the server entirely:
<jmx:invoke
name="Catalina:type=Manager,path=/servlets-examples,host=localhost"
operation="stop"/>
If you have ssh access to the server, then you might like to consider the JSch library which you can use in combination with SSHExec Ant Task to start and stop your server:
<sshexec host="somehost"
username="dude"
password="yo"
command="/etc/init.d/tomcat restart"/>
deploy
task. the deploy itself works ... i'm sure there's a tomcat jvm memory setting i need to tweak, but your option is a more than suitable alternate. nice! –
Bridget © 2022 - 2024 — McMap. All rights reserved.