设置欢迎界面设置

来源:互联网 发布:c语言实验交换字母 编辑:程序博客网 时间:2024/04/30 23:37

在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即可,自动地位到欢迎页面  

0 0
原创粉丝点击