Spring 部署Tomcat 404 錯誤解決方案


將Spring項目部署到tomcat后,訪問網頁出現404錯誤

HTTP Status 404 – Not Found The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

 

1. 查看tomcat下的log文件

SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file 

 

在WEB-INF/classes下創建logging.properties文件

org.apache.catalina.core.ContainerBase.[Catalina].level=INFO
org.apache.catalina.core.ContainerBase[Catalina].handlers=java.util.logging.ConsoleHandler

 重啟tomcat,之后就能看到全部錯誤log。

2.詳細錯誤

org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

 解決方法

Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties").
Select "Deployment Assembly".
Click the "Add..." button on the right margin.
Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".

  參考:http://stackoverflow.com/questions/6210757/java-lang-classnotfoundexception-org-springframework-web-context-contextloaderl

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM