Eclipse 顯示 Tomcat 啟動失敗、端口衝突或配置錯誤,90% 屬於以下三類問題,按順序排查通常 2 分鐘解決。
netstat -ano | findstr :8080 找 PID。server.xml 端口 (8080 → 8081/8888)。Servers 視圖 → 右鍵 Tomcat → Delete (僅移除配置,不刪安裝目錄)。Properties → Targeted Runtimes 取消勾選 → Apply → 重新勾選。conf/server.xml 或 context.xml 語法錯誤
Servers 專案下的配置檔,讓 Eclipse 重新產生乾淨配置。Address already in use → 端口衝突;SEVERE: StandardServer.await → 關閉埠口衝突 (8005);ClassNotFoundException → 專案缺少依賴 Jar。web.xml、context.xml 是否有重複 <Context> 定義。Maven → Update Project / Gradle → Refresh 確保依賴同步。刪除工作區 `.metadata/.plugins/org.eclipse.wst.server.core` 目錄 (關閉 Eclipse 後),重啟 Eclipse 重新配置 Server,可清除所有殘留配置狀態。
按順序操作,絕大多數「配置正確卻啟動失敗」即可解決。