How to deploy war file to tomcat using command prompt?

后端 未结 8 804
慢半拍i
慢半拍i 2021-01-30 11:05

I have created a war file and put into tomcat/webapps. How to deploy a war file to tomcat using command prompt?

8条回答
  •  梦如初夏
    2021-01-30 11:40

    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
    

提交回复
热议问题