I have created a war file and put into tomcat/webapps
. How to deploy a war file to tomcat using command prompt?
First add a user role in tomcat-users.xml for role manager-script.
Then to undeploy current app you can use
wget http://username:password@localhost:portnumber/manager/text/undeploy?path=/appname -O - -q
To deploy
wget http://username:password@localhost:portnumber/manager/text/deploy?path=/appname&war=file:/warpath -O - -q