1.配置歡迎頁面的方式
<welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list>
2.歡迎頁面可以設置多個
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>html/welcome.html</welcome-file> </welcome-file-list>
3.歡迎頁面的注意事項
1)歡迎頁面不以“/”開頭
2)必須保證在webapp根目錄下有此資源
3)優先級自上而下,越靠上優先級越高
4)歡迎頁面不一定是html,可以是任意一種資源:servlet、jsp
4.全局歡迎頁面在web服務器(tomcat)中配置了
下圖為tomcat服務器下conf文件夾中web.xml文件的歡迎頁面的配置,此為全局配置,若自己項目中沒有配置歡迎頁面則默認使用tomcat的配置,否則使用自己的配置