关于SSH框架中action找不到的原因:
1.struts-config.xml中应该有
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />
2.struts-config.xml中的配置applicationContext.xml的路径问题
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="classpath:applicationContext.xml" />
</plug-in>
或者:
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />
</plug-in>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
3.包冲突:
删除:c3p0-0.9.0.4.jar
asm-2.2.3.jar
4.必须删除包hibernate-annotations.jar(这一点最重要)
--------------------痞子木宣
1.struts-config.xml中应该有
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />
2.struts-config.xml中的配置applicationContext.xml的路径问题
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="classpath:applicationContext.xml" />
</plug-in>
或者:
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />
</plug-in>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
3.包冲突:
删除:c3p0-0.9.0.4.jar
asm-2.2.3.jar
4.必须删除包hibernate-annotations.jar(这一点最重要)
--------------------痞子木宣
SSH框架Action找不到原因
本文详细解析了SSH框架中Action找不到的问题,主要从Struts配置文件struts-config.xml的设置入手,包括请求处理器的配置、Spring上下文加载插件的路径配置等,并指出了可能存在的jar包冲突及解决方案。
7043

被折叠的 条评论
为什么被折叠?



