第一步:
找到安装Tomcat的目录$Apache Software Foundation/Tomcat 5.5/conf/web.xml,然后打开找到如下代码
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
把其中如下代码删除
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
第二步:
找到<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
把<param-value>false</param-value>改为<param-value>true</param-value>
重启Tomcat服务器即可
本文介绍如何配置Tomcat服务器,通过修改web.xml文件中的设置,来指定默认加载的首页文件,并开启目录列表浏览功能。具体步骤包括移除默认首页文件列表并启用资源列表参数。
585

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



