【欢迎资源文件】
1.前提:
用户可以记住网站名,但是不会记住网站资源文件名
2.默认欢迎资源文件:
用户发送了一个针对某个网站的【默认请求】时,
此时由Http服务器自动从当前网站返回的资源文件
正常请求: http://localhost:8080/myWeb/index.html
默认请求: http://localhost:8080/myWeb/
3.Tomcat对于默认欢迎资源文件定位规则
1)规则位置:Tomcat安装位置/conf/web.xml
2)规则命令:<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
4.设置当前网站的默认欢迎资源文件规则
1)规则位置: 网站/web/WEB-INF/web.xml
2)规则命令: <welcome-file-list>
<welcome-file>login.html</welcome-file>
<weLcome-file>user/ find</welcome-file>< !--servLet作为默认欢迎资源时,开头斜线必须抹掉-->
</welcome-file-list>
3)网站设置自定义默认文件定位规则,此时Tomcat自带定位规则将失效