`
asdcls
  • 浏览: 17172 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Struts2的一个问题!Caused by: java.lang.NoClassDefFoundError: org/springframework/cont

    博客分类:
  • java
阅读更多
关键字: struts2
问题:

Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware

原因:

Struts2的struts2-spring-plugin-2.0.11.jar等jar包需要使用ApplicationContextAware 去找Spring的

Context,结果ApplicationContextAware类都找不到!

解决方法(选择一种方法即可):

方法1.在Struts2项目中只保留Struts2的5个必须的包,其他全部删除

5个必须的包是:
        commons-logging-1.0.4.jar
        freemarker-2.3.8.jar        
        ognl-2.6.11.jar
        struts2-core-2.0.11.1.jar
        xwork-2.0.4.jar

方法2:

你的项目需要Spring的话,把Spring的包加进来也可以!




摘自:http://blog.csdn.net/liuxiaotao008/archive/2008/07/18/2672200.aspx
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics