首页 > 编程语言 > 详细

tomcat加载不了spring-webjar终极解决办法

时间:2015-12-22 16:20:28      阅读:266      评论:0      收藏:0      [点我收藏+]

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:

  1. Open the project‘s properties (e.g., right-click on the project‘s name in the project explorer and select "Properties").
  2. Select "Deployment Assembly".
  3. Click the "Add..." button on the right margin.
  4. Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
  5. 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加载不了spring-webjar终极解决办法

原文:http://www.cnblogs.com/meggie523/p/5066722.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!