在web.xml文件中配置如下信息:
1.关于webapp的欢迎页面设置
1.欢迎页面设置?
假设在WebRoot目录下创建login.html,想让login.html作为整个webapp的欢迎页面,应该做这样的设置编写web.xml文件。
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
例如:
<!-- 欢迎页面设置 -->
<!-- <welcome-file-list><welcome-file>login.html</welcome-file>
</welcome-file-list> -->
<welcome-file-list>
<welcome-file>html/welcome.html</welcome-file>
</welcome-file-list>
2.为什么设置欢迎页面
*为了访问更加的方便,为了提高用户的体验
*设置欢迎页面之后直接在浏览器地址栏上访问该webapp即可,自动地位到欢迎页面