WAR有两种组织方式,一种是按一定的目录结构组织文件,一种是一个后缀为WAR的压缩包,因此它的部署方式也有两种:
- 在浏览器中输入:http://localhost:8080/manager/install?path=/examples&war=file:/c:\examples
就会将按目录结构组织的WAR部署
http://localhost:8080/manager/install?path=/examples&war=file:/c:\examples
- 如果输入:http://localhost:8080/manager/install?path=/examples&war=jar:file:/c:\examples.war!/
就会将按压缩包组织的WAR部署,注意此url后半部分一定要有!/号。
http://localhost:8080/manager/install?path=/examples&war=jar:file:/c:\examples.war!/
- 部署后就可以用 http://localhost:8080/examples访问了。
http://localhost:8080/examples
- 在浏览器中输入:http://localhost:8080/manager/remove?path=/examples就会撤销刚才部署的应用程序。
http://localhost:8080/manager/remove?path=/examples