課程
/后端開發
/Java
/JAVA遇見HTML——JSP篇
為什么http://localhost:8080/myhome/在不設定歡迎頁面的時候,index.jsp就能訪問,改個名字就不能了?
2018-04-06
源自:JAVA遇見HTML——JSP篇 1-7
正在回答
未做配置時,index.jsp為默認首頁,改名后就不能找到,其他名需要配置web.xml
web.xml
<welcome-file-list>
? ? ? ? <welcome-file>index.html</welcome-file>
? ? ? ? <welcome-file>index.htm</welcome-file>
? ? ? ? <welcome-file>index.jsp</welcome-file>
? ? </welcome-file-list>
xml配置
或者說哪個文件里的哪個代碼把index.jsp設定為默認歡迎頁面?
舉報
Java Web入門級教程JSP,帶你輕松的學習JSP基礎知識
3 回答http://localhost:8080/myhome/index.jsp報錯
6 回答為什么可以訪問http://localhost:8080/myhome/haha.jsp,但訪問http://localhost:8080/myhome/報404異常呢
1 回答按照視頻講解的方法,無法訪問index.jsp http://localhost:8080/myhome/index.jsp
3 回答輸入 http://localhost:8080/myhome/index.jsp后出現錯誤
2 回答訪問localhost:8080/myhome/index.jsp時,報404(the requested resource is not available.)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-05-31
未做配置時,index.jsp為默認首頁,改名后就不能找到,其他名需要配置web.xml
2018-05-17
web.xml
2018-05-17
<welcome-file-list>
? ? ? ? <welcome-file>index.html</welcome-file>
? ? ? ? <welcome-file>index.htm</welcome-file>
? ? ? ? <welcome-file>index.jsp</welcome-file>
? ? </welcome-file-list>
2018-05-17
xml配置
2018-04-06
或者說哪個文件里的哪個代碼把index.jsp設定為默認歡迎頁面?