出现这个问题的原因主要有两个

1、如果项目没有使用Spring,则struts.xml配置文件中,这个action的class属性的路径没有写完整,应该是包名.类名

2、如果项目使用了Spring,那就是applicationContext.xml里面没有为这个action定义bean。这样strus.xml中的对应action的class属性的值就是Spring配置文件中bean的id,比如:

applicationContext.xml

  1. <bean id="adminAction" class="go.derek.action.AdminAction"
  2. scope="prototype">
  3. </bean>

struts.xml

  1. <action name="admin" class="adminAction" method="execute">
  2. <result>/admin.jsp</result>
  3. </action>

Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方案的更多相关文章

  1. 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 ...

  2. SSH整合:Unable to instantiate Action, employeeAction, defined for 'emp-list' in namespace '/'employeeAction - action

    SSH整合,照着视频敲的,不知为何会报错,经历了快两周的折磨给解决了.记录下来给后面需要帮助的人,也算极好的了. Struts Problem Report Struts has detected a ...

  3. SSH整合报错:Unable to instantiate Action, testAction, defined for 'test' in namespace '/'testAction

    报错如下: Struts Problem Report Struts has detected an unhandled exception: Messages: testAction Unable ...

  4. 出现"Unable to instantiate Action,xxxxx, defined for 'login' in namespace '/' xxxxx 解决办法

    转自:https://blog.csdn.net/heroful/article/details/17261169 问题原因: 在MyEclipse 利用SSH框架写程序,运行时出现 " U ...

  5. 2.Unable to instantiate Action, templateAction, defined for 'template_list' in namespace '/'templateAction

    1.错误说没有命名空间'templateAction,但是在struts里写了这个,名字跟Action的名字是一样的,为什么会报这个错误 2.反复检查路径和名字,都没有问题 3.发现没有对其进行注入操 ...

  6. Unable to instantiate Action, MenuAction, defined for 'QueryMenuAll' in namespace '/'MenuAction

    我刚好也遇到这样的情况,发现是自己的配置文件里写错了,spring里的id属性值要对应struts里class属性值.

  7. 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 ...

  8. Unable to instantiate Action, xxxAction, defined for 'xxxAction' in namespace '/'xxx

    最近写SSH2的项目时,遇到一些小问题,action得不到service实例,遂将struct2委托给spring进行管理,然后修改了bean的id和action的class,但是运行后发现找不到ac ...

  9. 报错HTTP Status 500 - Unable to instantiate Action

    报错如下: HTTP Status 500 - Unable to instantiate Action, visitAction, defined for 'visit_toAddPage' in ...

随机推荐

  1. 【C语言】一元二次方程(求实根和虚根)

    求一元二次方程:ax2+bx+c=0 的根. 输入三个实数a,b,c的值,且a不等于0. #include<stdio.h> #include<math.h> int main ...

  2. 干了这杯Java,让你的Idea比eclipse好用

    1.Idea基本配置 1.1 Idea简介 Idea是一个专门针对Java的集成开发工具(IDE),由Java语言编写.所以,需要有JRE运行环境并配置好环境变量.简单的说,Idea是写代码用的工具. ...

  3. html 打印相关操作与实现

    2020-02-19 | chrome 79.0.3945.130 测试无问题 未做兼容测试 原理为调用 window.print() 方法,但是该方法只能对当前页面全部打印,所以有了以下方案来解决局 ...

  4. HGAME 2020 misc

    week1 每日推荐 拿到Wireshark capture file后,按常规思路,用foremost命令拿到一个加密的压缩包,之后文件->导出对象->http,看到最大的一个文件里面最 ...

  5. java_设计模式_装饰设计模式

    package IO; /* * 装饰设计模式 模拟咖啡 * 1.抽象组件:需要装饰的抽象对象(接口或抽象父类) * 2.具体组件:需要装饰的对象 * 3.抽像装饰类:包含了对抽象组件的引用以及装饰着 ...

  6. HDU4081 Qin Shi Huang's National Road System

    先求最小生成树 再遍历每一对顶点,如果该顶点之间的边属于最小生成树,则剪掉这对顶点在最小生成树里的最长路径 否则直接剪掉连接这对顶点的边~ 用prim算法求最小生成树最长路径的模板~ #include ...

  7. 吴裕雄--天生自然神经网络与深度学习实战Python+Keras+TensorFlow:Bellman函数、贪心算法与增强性学习网络开发实践

    !pip install gym import random import numpy as np import matplotlib.pyplot as plt from keras.layers ...

  8. TOPSIS算法

    title: TOPSIS算法 date: 2020-02-24 11:18:06 categories: 数学建模 tags: [评价模型, MATLAB] mathjax: true 定义 ​ C ...

  9. ubuntu的apt

    1. apt edit-sources  #编辑apt的源列表( 或者直接写这个命令:vim /etc/apt/sources.list ) 2. apt list   #列出包含条件的包(已安装,可 ...

  10. nginx+keepalived实现主从高可用

    设备: 主:192.168.200.122 从:192.168.200.124 安装:两台都分别安装nginx以及keepalived 两台机步骤一致一主一从 安装nginx的依赖包 [root@lo ...