Spring 部署Tomcat 404 错误解决方案
2017-03-27 17:09
344 查看
将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文件
在WEB-INF/classes下创建logging.properties文件
重启tomcat,之后就能看到全部错误log。
2.详细错误
解决方法
参考:http://stackoverflow.com/questions/6210757/java-lang-classnotfoundexception-org-springframework-web-context-contextloaderl
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
相关文章推荐
- tomcat中部署项目后,访问失败,报错404的原因以及解决方案
- "Tomcat+Spring+Quartz"解决方案下,关闭Tomcat出现"线程未关闭,出现内存泄漏"错误
- Tomcat部署Servlet出现404解决方案
- 项目部署到tomcat上启动后出现404错误
- Tomcat部署Web项目总是404错误
- IntelliJ IDEA新建Maven项目及部署至tomcat 以及JmxAdminException错误解决方案
- Tomcat 部署 Spring Boot 项目 报错 404
- Tomcat 本地部署 【404】错误解决
- 如何让Tomcat在指定JDK版本下启动而不依赖环境变量中配置的版本,解决部署到Tomcat中报404版本错误问题
- 从Eclipse启动tomcat服务器,访问出现 404 错误的解决方案
- Tomcat部署Servlet出现404解决方案
- linux 下tomcat部署项目中包含中文名称文件,报404找不到文件错误
- SpringBoot项目部署在同一个tomcat容器报错的解决方案
- linux 下tomcat部署项目中包含中文名称文件,报404找不到文件错误
- tomcat下部署两个工程时,只有一个可以访问,另一个出现404错误,该如何解决
- redhat linux tomcat 中文URL 404 错误解决方案
- Linux下tomcat部署的项目,应用下载到项目中的文件,无法下载,会报404找不到文件的错误
- 如何让Tomcat在指定JDK版本下启动而不依赖环境变量中配置的版本,解决部署到Tomcat中报404版本错误问题
- Tomcat部署Web项目总是404错误
- 在windows下的tomcat里没有问题的项目,在linux的tomcat下部署之后运行是404,报以下错误