1.
找到server.xml文件
首先修改tomcat的默认端口为80 <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="80" .............然后修改 <!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<!-- 原来 tomcat默认是 appBase = "webapp"-->
<Host name="localhost" appBase="D:/YourFolder"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
2.
建立D:\YourFolder目录,并建立一个名为“ROOT”的子目录,ROOT子目录下可以放置你的WEB-INF等相关文件夹、jsp文件了。3.
在WEB-INF子目录下建立一个web.xml文件,做相应的设置 <!-- 默认访问页面设置 -->
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
<welcome-file>login.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>4.重启tomcat
找到server.xml文件
首先修改tomcat的默认端口为80 <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="80" .............然后修改 <!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<!-- 原来 tomcat默认是 appBase = "webapp"-->
<Host name="localhost" appBase="D:/YourFolder"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
2.
建立D:\YourFolder目录,并建立一个名为“ROOT”的子目录,ROOT子目录下可以放置你的WEB-INF等相关文件夹、jsp文件了。3.
在WEB-INF子目录下建立一个web.xml文件,做相应的设置 <!-- 默认访问页面设置 -->
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
<welcome-file>login.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>4.重启tomcat
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货