找不到action 错误-----终极解决办法
此错误多是由于spring上下文载入失败引起
在struts中引入了spring之后,工程的上下文便交给spring插件负责载入
在struts-config.xml中:
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/applicationContext.xml" />
</plug-in>
此时找不到action多是由配置文件的位置不对引起的,即服务器找不到applicationContext.xml,注意查看myEclipse是否将该配置文件复制到了正确的位置。
或者有其他错误---------当spring或者Hibernate配置文件中的配置有问题时就会出现这种情况
出现这个问题最有可能就是DAO类配置有错误,sping的配置文件出错在web方式下是看不到的,可以写个DAO的测试类在java环境下查错
public static void main(String[] args) {
String[] path = {"/WebRoot/WEB-INF/applicationContext.xml"};
ApplicationContext ctx = new FileSystemXmlApplicationContext(path);
UserDAO dao = (UserDAO) ctx.getBean("userDAO");
System.out.print(dao.isValidUser("uu","pp"));
很快可以找出错误的地方;
分享到:
相关推荐
应用uni-swipe-action组件实现列表项左划操作。 真正做到开箱即用。
Action-RPG Starter Kit 6.55 商店几百买的最新
NULL 博文链接:https://tianhandigeng.iteye.com/blog/995031
CPP-Concurrency-In-Action-2ed-2019-master Makeddown格式
extjs in action 1-6章节 pdf extjs in action 1-6章节 pdf
Struts2-ActionError-ActionMessage-Example
springinaction2-P2c5.pic.rar springinaction2-P2c5.pic.rar
Spring-in-Action Spring-in-Action Spring-in-Action
SpringInAction2-part1 pic SpringInAction2-part1
Kubernetes in Action is a comprehensive guide to effectively developing and running applications in a Kubernetes environment. Before diving into Kubernetes, the book gives an overview of container ...
Laravel开发-action-log Laravel的操作日志
jar包,官方版本,自测可用
react-native-circular-action-menu, 由CircularFloatingActionMenu启发的路径esque循环菜单 react-native-circular-action-menu路径esque循环菜单由 CircularFloatingActionMenu 激发。安装npm i react-native-...
spring-in-action-5-samples-master源代码
Lucene-in-Action-2nd-Edition---Manning.pdf 英文版
Kanban in Action is a down-to-earth, no-frills, get-to-know-the-ropes introduction to kanban. It’s based on the real-world experience and observations from two kanban coaches who have introduced this...
Nim is a multi-paradigm language that offers ... In Nim in Action you’ll learn how Nim compares to other languages in style and performance, master its structure and syntax, and discover unique features
Loadrunner Error -27492: "HttpSendRequest" failed, Windows error code....错误解决方法
如果你被servlet action isnot available 困扰了很久都没有办法解决,那么就用这个包替换掉commons-beanutils的包!看看这个方案吧!
android-floating-action-button-master.zip,太多无法一一验证是否可用,程序如果跑不起来需要自调,部分代码功能进行参考学习。