我是新來的J2EE我試圖在我的tomcat 7.0上運行一個html文件作爲試用版 輸入url http://localhost:8081/成功導航到tomcat主頁,但是當我嘗試從eclipse運行我的「動態web項目」它包含什麼,但web.xml和index.html文件,我收到此錯誤請求的資源不可用。 Tomcat 7.0
HTTP狀態404 -/StudentManagement/
類型狀態報告
消息/ StudentManagement/
description請求的資源不可用。
web.xml
內容:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="w3.org/2001/XMLSchema-instance"; xmlns="java.sun.com/xml/ns/javaee"; xsi:schemaLocation="java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID" version="3.0">
<display-name>StudentManagement</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
很難說沒有看到'web.xml'文件出了什麼問題。 – Makoto
您必須將URL配置爲您的項目。檢查你的web.xml。 – Arun
**這是我的xml文件** '<?xml version =「1.0」encoding =「UTF-8」?> <顯示名稱> StudentManagement顯示名稱> <歡迎文件列表> <歡迎文件>的index.html歡迎文件> 歡迎文件列表> ' –