![spring没能给struts2创建出action,可能出现的原因 spring没能给struts2创建出action,可能出现的原因](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
spring没能给struts2创建出action,可能出现的原因:
1.没有加载struts2-spring-plugin-2.1.8.1.jar
2.包冲突,删除asm.jar(网上说的)
3.struts或spring 配置文件错误(可以看我写的“struts2+spring整合框架 ”)
4.spring配置文件名错误,spring配置文件默认是applicationContext.xml,在web.xml中可能会配成
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
</context-param>