訪問https://localhost:8080/oa/main/index.jsp返回404,但Tomcat默認頁面(/)正常。
webapps/oa目錄是否存在?是否為爆炸部署(目錄)而非war包未解壓?server.xml中<Context path="/oa" docBase="oa" />,或conf/Catalina/localhost/oa.xml配置。<welcome-file-list><welcome-file>main/index.jsp</welcome-file></welcome-file-list>。webapps/oa/main/index.jsp是否存在?大小寫敏感(Linux)。logs/catalina.out、localhost.yyyy-mm-dd.log查看部署錯誤/404詳情。/manager、/host-manager。index.jsp路徑而非項目根路徑/oa/測試。https://localhost:8080/oa/ → 若404說明Context Path未生效或項目未部署。https://localhost:8080/oa/main/index.jsp → 確認JSP路徑。webapps/oa/WEB-INF/web.xml語法正確性。# 停止Tomcat
rm -rf webapps/oa webapps/oa.war
cp your-project.war webapps/oa.war
# 啟動Tomcat,觀察日志是否解壓成功