How to deploy war file to tomcat using command prompt?

后端 未结 8 813
慢半拍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:43

    i tried this it works quite well

    curl --request PUT --upload-file webapp.war --basic --user user:password \
      http://hostname:port/manager/text/deploy?path=/web_path\&update=true
    

    it is based on the published tomcat manager API: https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html#Deploy_A_New_Application_Archive_(WAR)_Remotely

提交回复
热议问题