我寫了一個基本的Hello World我們的動態項目,並安裝了apache服務器。如何看到web.xml是在我的Web項目中讀取的
的web.xml內容,
<display-name>hello</display-name>
<welcome-file-list>
<welcome-file>hello.html</welcome-file>
</welcome-file-list>
hello.html的是,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Hello World!!
</body>
</html>
開始我的Apache後,我試圖訪問URL,
http://localhost:8080/hello.html
Getti ng錯誤爲:HTTP狀態404 - /hello.html
任何建議?
有一個在你的項目目錄中沒有的hello.xml。正確的URL應該是http:// localhost:8080/hello.html – KayV