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

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. 如何在项目中新建.gitignore文件

    1. 在需要创建 .gitignore 文件的文件夹, 右键选择 Git Bash 进入命令行,进入项目所在目录. 2. 输入 touch .gitignore 在文件夹就生成了一个“.gitigno ...

  2. Docker - Dockerfile - 常见命令简介

    概述 感觉是个 比较重要的东西 有个疑问 我是先讲 docker build 还是 先讲 Dockerfile 穿插讲 docker build 最基本的东西 原理 -t -f docker file ...

  3. zabbix-agent不能启动:配置文件出现特殊字符导致

    问题如下: 定位查找问题: 命令:journalctl  -xe [重点] 图中可见错误信息在zabbix_agent配置文件中的“hostname=”中不能出现特殊字符,我出错的原因是写成了:hos ...

  4. 转载:AAC文件解析及解码

    转自:http://blog.csdn.net/wlsfling/article/details/5876016 http://www.cnblogs.com/gaozehua/archive/201 ...

  5. js相关--浅拷贝和深拷贝

    1.js的数据类型 基本概述:js的数据类型分为两种,分别为基本数据类型和引用数据类型,它们俩的区别在于基本数据类型采用值传递,引用数据类型采用指针形式传递. 如下所示:引用类型通过简单的=进行复制, ...

  6. Linux 服务器作为Nginx web服务器常见优化参数

    内核参数调整cat /etc/sysctl.conf# sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/ ...

  7. selenium Python实现附件上传

    对于web页面的上传功能一般有两类实现方式:一类是将本地文件的路径作为一个值放在input标签中,通过form表单将这个值提交给服务器:另一个类是插件上传,一般基于flash/javascript或者 ...

  8. zookeeper 源码(二) session 和 处理事务请求

    问题 session 如何生成的?sessionId为什么不直接使用时间戳+单机名 sessionid 关闭的时候的逻辑,sessionid 的维护是由各节点还是leader ? 会话相关 sessi ...

  9. 安装ubuntu18.04.3全过程

    目录 一.安装ubuntu18.04.3操作系统 二.系统设置 三.非开发常用软件安装 四.开发常用软件安装 五.ubuntu相关知识 六.参考文章链接 正文 一.安装ubuntu18.04.3操作系 ...

  10. UIDocumentPickerViewController和UIDocumentInteractionController

    UIDocumentPickerViewController和UIDocumentInteractionController UIDocumentPickerViewController 补充一下,U ...