Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方案
出现这个问题的原因主要有两个
1、如果项目没有使用Spring,则struts.xml配置文件中,这个action的class属性的路径没有写完整,应该是包名.类名
2、如果项目使用了Spring,那就是applicationContext.xml里面没有为这个action定义bean。这样strus.xml中的对应action的class属性的值就是Spring配置文件中bean的id,比如:
applicationContext.xml
- <bean id="adminAction" class="go.derek.action.AdminAction"
- scope="prototype">
- </bean>
struts.xml
- <action name="admin" class="adminAction" method="execute">
- <result>/admin.jsp</result>
- </action>
Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方案的更多相关文章
- SSH Spring3\Java1.8 “Unable to instantiate Action, xxAction, defined for 'xxAction_login' in namespace '/'null”
1.Stacktraces Unable to instantiate Action,xxAction, defined for 'xxAction_login' in namespace '/'nu ...
- SSH整合:Unable to instantiate Action, employeeAction, defined for 'emp-list' in namespace '/'employeeAction - action
SSH整合,照着视频敲的,不知为何会报错,经历了快两周的折磨给解决了.记录下来给后面需要帮助的人,也算极好的了. Struts Problem Report Struts has detected a ...
- SSH整合报错:Unable to instantiate Action, testAction, defined for 'test' in namespace '/'testAction
报错如下: Struts Problem Report Struts has detected an unhandled exception: Messages: testAction Unable ...
- 出现"Unable to instantiate Action,xxxxx, defined for 'login' in namespace '/' xxxxx 解决办法
转自:https://blog.csdn.net/heroful/article/details/17261169 问题原因: 在MyEclipse 利用SSH框架写程序,运行时出现 " U ...
- 2.Unable to instantiate Action, templateAction, defined for 'template_list' in namespace '/'templateAction
1.错误说没有命名空间'templateAction,但是在struts里写了这个,名字跟Action的名字是一样的,为什么会报这个错误 2.反复检查路径和名字,都没有问题 3.发现没有对其进行注入操 ...
- Unable to instantiate Action, MenuAction, defined for 'QueryMenuAll' in namespace '/'MenuAction
我刚好也遇到这样的情况,发现是自己的配置文件里写错了,spring里的id属性值要对应struts里class属性值.
- HTTP Status 500 - Unable to instantiate Action, customerAction, defined for 'customer_toAddPage' i
使用struts2时碰到这样的错误 HTTP Status 500 - Unable to instantiate Action, customerAction, defined for 'custo ...
- Unable to instantiate Action, xxxAction, defined for 'xxxAction' in namespace '/'xxx
最近写SSH2的项目时,遇到一些小问题,action得不到service实例,遂将struct2委托给spring进行管理,然后修改了bean的id和action的class,但是运行后发现找不到ac ...
- 报错HTTP Status 500 - Unable to instantiate Action
报错如下: HTTP Status 500 - Unable to instantiate Action, visitAction, defined for 'visit_toAddPage' in ...
随机推荐
- ssh复制秘钥成功后仍然需要输入密码
执行免秘钥操作 ssh-copy-id -i ~/.ssh/id_rsa.pub lyg@192.168.1.65 被登录机器的文件权限: //用户权限 chmod 700 /home/usernam ...
- 数据库程序接口——JDBC——API解读第二篇——执行SQL的核心对象
结构图 核心对象 Statement Statement主要用来执行SQL语句.它执行SQL语句的步骤为: 第一步:创建statement对象. 第二步:配置statement对象,此步骤可以忽略. ...
- Go_ioutil包
1. ioutil包的方法 // Discard 是一个 io.Writer 接口,调用它的 Write 方法将不做任何事情 // 并且始终成功返回. var Discard io.Writer = ...
- yum grouplist 安装gnome桌面环境
经常,我们如果需要安装一些比较复杂的软件时,都会在安装操作系统的时候直接勾选,然后进行安装.但是,有的时候,等操作系统安装完了才发现有遗漏的软件没有安装. 这个时候,yum就要出来救场了.使用yu ...
- nodejs的req取参req.body,req.params,req.query
1/req.query: Get:/domo?name=ximiximi&blog=https://home.cnblogs.com/u/ximiximi-blog/ app.get('/do ...
- C# 重载与重写
重载(overload) 指调用同一方法名,但各方法中参数的数据类型.个数或顺序不同. public static int Add(int x,int y) { return x + y; } pub ...
- mysql区分大小写问题
- Ubuntu 16 安装Nginx+Php+Mysql
嗯哼,结束外派,我胡汉三又回来了,回来第一件事,就是重新装服务器,搭环境,以前用的apache,最近改了nginx,来吧,从头开始 因为以前一直用apache,这次换一个nginx试试. 1.更新系统 ...
- Jmeter_选项_函数助手_RandomString的用法
1.用处:测试账户注册可以通过随机生成数实现,而不需要Excel手动输入, 缺点:随机生成数可能会重复 优点:不需要使用CSV config 或者excel ,txt格式 2.举例:之前我们通过CSV ...
- 正则去掉 html标签
var htmlStr='<p class="cjk" style="margin-bottom: 0cm; line-height: 16px;"> ...