zoukankan      html  css  js  c++  java
  • 欢迎资源文件

    欢迎资源文件

    • 一、
      前提:用户可以记住网站名,但是不会记住网站资源文件名。
    • 二、
      默认欢迎资源文件,用户发送了一个针对某个网站的【默认请求】时,此时由Http服务器自动从当前网站返回的资源文件。
      正常请求:http://localhost:8080/myWeb/index.html
      默认请求:http://localhost:8080/myWeb/
    • 三、
      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>
    
    • 四、
      设置当前网站的默认欢迎资源文件规则:
      1)规则位置:网站/web/WEB-INE/web.xml
      2)规则命令:
        <welcome-file-list>
            <welcome-file>login.html</welcome-file>
        </welcome-file-list>
    

    3)网站设置自定义默认文件定位规则,此时Tomcat自带定位规则将失效。

  • 相关阅读:
    【HDOJ6701】Make Rounddog Happy(启发式合并)
    【HDOJ6731】Angle Beats(极角排序)
    【BZOJ1132】Tro(叉积)
    【CF1236D】Alice and the Doll(set)
    Storm
    Spark
    Python基础(2)
    数据库漫谈
    Python基础(1)
    C/C++链接过程相关
  • 原文地址:https://www.cnblogs.com/yu011/p/13775897.html
Copyright © 2011-2022 走看看