关键字: 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.youkuaiyun.com/liuxiaotao008/archive/2008/07/18/2672200.aspx
问题:
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.youkuaiyun.com/liuxiaotao008/archive/2008/07/18/2672200.aspx