Reputation: 4289
Underneath are few approaches I have taken so far to achieve this task:
I have looked at the following solutions but none of them worked for me:
Upvotes: 1
Views: 5791
Reputation: 1423
For start/stop tomcat
In linux environment use SSH to reach the terminal of the remote machine. from the terminal You can start/stop the tomcat
to start startup.sh to stop shutdown.sh
Under windows environment
Install OpenSSHD for Windows - this will allow remote "console" sessions.
If you looking for something very "unix-like" then you can install cygwin.
http://www.worldgoneweb.com/2011/installing-openssh-on-windows-7/
to start startup.bat to stop shutdown.bat
For deployment
Simply go to tomcat manager link on the below page(on any environment)
http://your_server_ip
:port_number
/
user credential are specified in tomcat-users.xml inside conf di
Upvotes: 0
Reputation: 78619
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"/>
Upvotes: 1