tomcat加载不了spring-webjar终极解决办法
2015-12-22 15:31
363 查看
Problems:
I included:
all Spring libs,
Apache Tomcat 7.0 library
in Build Path
but it still gives errors:
In "org.sprintframework.web-3.1.0.M1.jar", I can see "org.springframework.web.context.ContextLoaderListener".
Someone on Google says that spring.jar should be included but I don't see any spring.jar in 3.x distribution.
Eclipse 3.6.2 Tomcat 7
Edit: Someone says "Automatically update dependencies" should be checked in Project Properties but I don't see anything like that in project properties. ClassNotFoundException:org.springframework.web.con text.ContextLoaderListener
I had a problem when running a spring web application in an Eclipse managed tomcat. I solved this problem by adding maven dependencies in the project's web deployment assembly.
I find the solutions:
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".
You should see "Maven Dependencies" added to the Web Deployment Assembly definition.
I included:
all Spring libs,
Apache Tomcat 7.0 library
in Build Path
but it still gives errors:
In "org.sprintframework.web-3.1.0.M1.jar", I can see "org.springframework.web.context.ContextLoaderListener".
Someone on Google says that spring.jar should be included but I don't see any spring.jar in 3.x distribution.
Eclipse 3.6.2 Tomcat 7
Edit: Someone says "Automatically update dependencies" should be checked in Project Properties but I don't see anything like that in project properties. ClassNotFoundException:org.springframework.web.con text.ContextLoaderListener
I had a problem when running a spring web application in an Eclipse managed tomcat. I solved this problem by adding maven dependencies in the project's web deployment assembly.
I find the solutions:
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".
You should see "Maven Dependencies" added to the Web Deployment Assembly definition.
相关文章推荐
- Tomcat结合nginx使用小结
- MyEclipse Web Project导入Eclipse Dynamic Web Project,无法部署到tomcat问 题
- linux(centos) java+apache+tomcat配置
- 在Tomcat部署Solr
- Tomcat 7遇到StackOverflowError的异常的解决办法
- Tomcat 初探(一) 简介
- Myeclipse远程调试Windows下的Tomcat
- 【Linux运维入门】Linux环境安装配置TomCat
- tomcat实现SSL配置
- tomcat manager详解
- 关于tomcat服务器无法打开文件名为中文名的页面的问题
- 通过域名访问项目,tomcat配置
- Linux下Tomcat的安装配置 去掉应用名称
- tomcat的运行脚本
- Eclipse集成Tomcat(web容器)
- Tomcat acceptCount参数
- Eclipse配置Tomcat服务器
- Tomcat中文乱码问题的原理和解决方法
- 升级到tomcat8时Artifact SpringMvcDemo:war exploded: Server is not connected. Deploy is not
- tomcat安装中的问题