為什么可以訪問http://localhost:8080/myhome/haha.jsp,但訪問http://localhost:8080/myhome/報404異常呢
<?xml?version="1.0"?encoding="ISO-8859-1"?> <web-app?xmlns="http://java.sun.com/xml/ns/javaee" ??xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ??xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ??????????????????????http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" ??version="3.0" ??metadata-complete="true"> <welcome-file-list> <welcome-file>/haha.jsp</welcome-file> </welcome-file-list> </web-app>
2016-11-16
<?xml?version="1.0"?encoding="ISO-8859-1"?>
?
<web-app?xmlns="http://java.sun.com/xml/ns/javaee"
??xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
??xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
??????????????????????http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
??version="3.0"
??metadata-complete="true">
????<welcome-file-list>
????????<welcome-file>/haha.jsp</welcome-file>
????</welcome-file-list>
?
</web-app>
2015-09-30
我把WEB-INF寫成WEB_INF了
2015-09-29
改為haha.jsp,有可能瀏覽器的緩存問題,試著關(guān)閉服務(wù)器和瀏覽器重新試一下。
2015-09-29
把web.xml中/haha.jsp改為haha.jsp