@
Newyorkcity <Host name="
xx.cn" appBase="webapps1"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/home/ubuntu/projects/webapps1.war" reloadable="true"/>
</Host>
<Host name="
xx.cn" appBase="webapps2"
unpackWARs="true" autoDeploy="true">
<Context path="/hello" docBase="/home/ubuntu/projects/webapps2.war" reloadable="true"/>
</Host>
如果想要每次 war 更新都自动热部署, 那么需要写脚本了:
上传 war 包,并且将 webapps1 webapps2 文件夹下自动解压出的项目移除 ,tomcat 会自动去解压热更新的