我的百宝箱之Tomcat全攻略(4) /webdav:running:0 /tomcat-doCS:running:0 /manager:running:0 /:running:0 面的信息分别为应用程序的路径,当前状态(running 或者stopped),与这个程序相连的session数。 3:重新装载应用程序 在浏览器中输入 http://localhost:8080/manager/reload?path=/examples,浏览器显示如下: OK - Reloaded application at context path /examples 表示example应用程序装载成功,如果我们将server.xml的Context元素的reloadable属性设为true(见上面表格),则没必要利用这种方式重新装载应用程序,因为tomcat会自动装载。 4:显示session信息 在浏览器中输入http://localhost:8080/manager/sessions?path=/examples,浏览器显示如下: OK - Session information for application at context path /examples Default maximum session inactive interval 30 minutes 5:启动和关闭应用程序 在浏览器中输入http://localhost:8080/manager/start?path=/examples和http://localhost:8080/manager/stop?path=/examples分别启动和关闭examples应用程序。 6:部署及撤销部署 WAR有两种组织方式,一种是按一定的目录结构组织文件,一种是一个后缀为WAR的压缩包,因此它的部署方式也有两种: (1):在浏览器中输入:http://localhost:8080/manager/install?path=/examples&war=file:/c:\examples 就会将按目录结构组织的WAR部署 (2):如果输入:http://localhost:8080/manager/install?path=/examples&war=jar:file:/c:\examples.war!/ 就会将按压缩包组织的WAR部署,注意此url后半部分一定要有!/号。 部署后就可以用 http://localhost:8080/examples访问了。 在浏览器中输入:http://localhost:8080/manager/remove?path=/examples 就会撤销刚才部署的应用程序。 (四):与apache集成 虽然tomcat也可以作web服务器,但其处理静态html的速度比不上apache,且其作为web服务器的功能远不如apache,因此我们想把apache和tomcat集成起来。