转自:https://blog.csdn.net/heroful/article/details/17261169

问题原因:


在MyEclipse 利用SSH框架写程序,运行时出现

" Unable to instantiate Action,xxxxx,  defined for 'login' in namespace '/' xxxxx "  错误

具体原因:

找不到 applicationContext.xml 中 bean id="xxxxx"

解决办法:

1、确认下 applicationContext.xml 文件存放路径

a)、如果 applicationContext.xml 存入在 src 目录下 , 请在 web.xml 中添加如下配置

  1. <context-param>
  2. <param-name>contextConfigLocation</param-name>
  3. <param-value>/WEB-INF/applicationContext*.xml,classpath*:/context/applicationContext*.xml</param-value>
  4. </context-param>

b)、如果 applicationContext.xml 存入在 WEB-INF 目录下,请在web.xml下删掉或注释掉以下配置

  1. <context-param>
  2. <param-name>contextConfigLocation</param-name>
  3. <param-value>/WEB-INF/applicationContext*.xml,classpath*:/context/applicationContext*.xml</param-value>
  4. </context-param>
 
 
 

出现"Unable to instantiate Action,xxxxx, defined for 'login' in namespace '/' xxxxx 解决办法的更多相关文章

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

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

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

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

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

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

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

  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, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方案

    出现这个问题的原因主要有两个 1.如果项目没有使用Spring,则struts.xml配置文件中,这个action的class属性的路径没有写完整,应该是包名.类名 2.如果项目使用了Spring,那 ...

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

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

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

  9. Unable to instantiate Action, xxxAction, defined for &#39;xxx&#39; in namespace &#39;/&#39;xxxAction解决方式

    出现这个问题的解决办法主要有两个 1.假设项目没有使用Spring,则struts.xml配置文件里,这个action的class属性的路径没有写完整,应该是包名.类名 2.假设项目使用了Spring ...

随机推荐

  1. FFT/NTT模板 既 HDU1402 A * B Problem Plus

    @(学习笔记)[FFT, NTT] Problem Description Calculate A * B. Input Each line will contain two integers A a ...

  2. rdb转为rdf

    dump-rdf -f N-TRIPLE -b http://localhost:2020/  -o iswc.nt terrsearch.ttl

  3. 【SQL Server 学习系列】-- 获取字符串中出现某字符的次数及字符某次出现的下标

    ) = '1_BB_CC_DD_AA_EE_YY_WW_HH_GG' --// 1. 获取下划线在字符串中出现的次数 SELECT LEN(@Str) - LEN(REPLACE(@Str, '_', ...

  4. centos的python2.6.x升级到python2.7.x方法;python2.6.x的版本就不要用了

    python2.6.x的版本,现在使用的很多插件都不支持了.所以如果你的centos还是使用的2.6.x版本,不要犹豫,赶紧升级到2.7.x版本 1.所谓升级,就是再安装一个python2.7.x版本 ...

  5. MongoDB与MySQL的插入性能测试【转】

    1.1  MongoDB的简单介绍 在当今的数据库市场上,MySQL无疑是占有一席之地的.作为一个开源的关系型数据库,MySQL被大量应用在各大网站后台中,承担着信息存储的重要作用.2009年,甲骨文 ...

  6. 基于jquery 全选、反选、各行换色、单击行选中事件实现代码

    <script language="javascript"> $(document).ready(function(){ //各行换色 $('table tr:odd' ...

  7. c#中的多态 c#中的委托

    C#中的多态性          相信大家都对面向对象的三个特征封装.继承.多态很熟悉,每个人都能说上一两句,但是大多数都仅仅是知道这些是什么,不知道CLR内部是如何实现的,所以本篇文章主要说说多态性 ...

  8. Neutron配置Floating IP

    下图是由一个虚拟机vm1,一个路由器ext-router,两个网络ext-net及demo-net组成的拓扑结构.要达到的目的很简单,即vm1不仅能使用私网IP和内部的其它虚拟机进行通信,还可以通过e ...

  9. mysql有哪几种索引

    从数据结构角度 1.  B+树索引(O(log(n))) 2.  hash索引 3.  FULLTEXT索引 4.  R-Tree索引 从物理存储角度 1. 聚集索引 2.  非聚集索引 从逻辑角度 ...

  10. C++结构体中使用函数与类中使用函数小结

    #include <iostream>#include <string.h>using namespace std;struct stud//学生信息结构体{    char ...