这种方法对我在Tomcat 6上有效(请参见Tomcat的jevelopers答案):
curl --upload-file <path to warfile> "http://<tomcat username>:<tomcat password>@<hostname>:<port>/manager/deploy?path=/<context>&update=true"
例:
curl --upload-file targetdebug.war "http://tomcat:tomcat@localhost:8088/manager/deploy?path=/debug&update=true"
非常容易。输出是这样的:
OK - Undeployed application at context path /debugOK - Deployed application at context path /debug



