Is it possible for a Tomcat to restart it self?
I have a tomcat application. I’m adding a functionallity for the application to auto-update (the self application will download new war files). However, after this is done, I need to stop the application in order to modify the war.
I know that this can
If Tomcat is configured in autoDeploy mode, then there is no need to stop Tomcat itself to deploy a new version of the war. You just need to somehow replace the old war with the updated version in the $TOMCAT_HOME/webapps folder. Tomcat will detect the new version and auto deploy it.
To store the updated war on your server, you can execute a script via Runtime.getRuntime().exec(…) as described here. The script to run could be an ant task that deploys the new war file.