Tomcat 啟動成功,https://localhost:8080 顯示預設頁面,但訪問 https://localhost:8080/專案名 返回 404。
server.xml 中 <Context path="/專案名" ...> 設定。WEB-INF/web.xml 定義預設頁面:<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
WebContent/WEB-INF/classes(或 target/classes)。netstat -ano | findstr 8080 對應的 PID。在 webapps 目錄下是否有專案資料夾或 .war 檔案?若無,代表部署失敗,請重點檢查第 1、4 項。
查看 Tomcat 日誌 logs/localhost.日期.log 與 logs/catalina.日期.log,搜尋 SEVERE 或專案名關鍵字,通常能定位具體錯誤(如類找不到、資料庫連線失敗導致啟動中斷)。