首先打开conf下的server.xml文件
新建一个<Host></Host>如下:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/tempwhw" debug="0" docBase="C:/tempwhw" reloadable="true">
</Context>
</Host>
相应的目录也应该建立。C:/tempwhw
在该目录下把webapps/ROOT下的web-inf目录拷贝到tempwhw下。
然后打开conf下的web.xml。把
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
false改成true。
文章出处:http://www.diybl.com/course/4_webprogram/jsp/jsp_js/2008325/107278.html
本文介绍如何通过修改Tomcat的server.xml和web.xml文件来部署应用程序。具体步骤包括设置<Host>节点参数、创建应用目录及复制必要文件、调整web.xml中listings参数为true等。
2507

被折叠的 条评论
为什么被折叠?



