`

Struts2中DMI一直错误(There is no Action mapped for namespace )

阅读更多

   本来准备试一下Struts2中的DMI机制,无奈又高的头晕了,做如下总结:

   1.There is no Action mapped for namespace ....

Struts Problem Report
Struts has detected an unhandled exception: 

Messages: There is no Action mapped for namespace / and action name index!add. 
 


--------------------------------------------------------------------------------

Stacktraces
There is no Action mapped for namespace / and action name index!add. - [unknown location] 

    如果在确定配置没有错误的前提下可以查看一下配置文件中DMI的配置项是否是打开的,默认是打开的,调整如下

    <constant name="struts.enable.DynamicMethodInvocation" value="true" />

   2.建议

     并不推荐使用DMI与Struts2标签支持的同意表单多用途提交,因为暴露了Action中的方法名

       

分享到:
评论

相关推荐

    一个struts2的例子:彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login

    前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, 再...

    HTTP Status 404 - There is no Action

    在Web开发中,尤其是使用基于Java的Web框架如Struts时,开发者可能会遇到一个常见的问题:“HTTP Status 404 - There is no Action mapped for namespace and action name BackMemberGroupAudit”。这个问题通常出现...

    struts2教程-学习笔记.zip

    "错误-There is no Action mapped for namespace and action name"是Struts2中常见的一个错误,表明在当前命名空间下没有找到对应的动作映射。"There is no Action mapped for namespace and action name错误的解决...

    struts2 HelloWord例字

    在网上找了好个struts2的例子结果都不好使报There is no Action mapped for namespace / and action name这个错,没办法自己搞了个好用的,myeclipse 6.0 +tomcat5.5 + jdk 1.5 引入项目后直接发布就可以了!

    解决使用struts2 时 访问web工程首页问题

    错误信息通常为:“There is no Action mapped for namespace / and action name.”,这意味着Struts2在尝试处理请求时找不到对应的Action映射。此外,如果设置了默认的欢迎页面(welcome file),但在启动应用后...

    Struts2深刻理解所记的笔记

    这有时会导致找不到Action的错误,如"There is no Action mapped for namespace/and action name Login.",需确保在web.xml中正确配置Struts2的FilterDispatcher以加载这些资源。 2. **UI组件与模板引擎**:为了...

    struts2 的异常收集

    HTTPStatus 404 - There is no Action mapped for namespace [/] and action name [user_login] ``` 这通常意味着在`struts.xml`中未为指定的动作名和命名空间配置对应的Action处理类。解决这一问题的关键在于确保...

    struts 中遇到的常见问题 解决,你还在痛苦中吗

    本文将针对其中一种常见的错误提示:“There is no Action mapped for namespace / and action name”进行深入分析,并给出相应的解决方法。 #### 二、问题描述 当在使用 Struts 框架开发 Web 应用时,如果配置...

    struts包下载

    当出现"10_Struts2_There_is_no_action_mapped_namespace异常"时,通常表示Struts 2找不到与请求路径相对应的Action配置。这可能是因为命名空间(namespace)配置错误,或者Action没有正确注册在struts.xml文件中。...

    Struts2 框架搭建(基本)和几个报错问题

    1. **No Action mapped for namespace [/] and action name [helloWorld]**:这通常意味着Struts2没有找到对应的Action配置。检查`struts.xml`文件是否正确配置了Action。 2. **Class not found**:如果出现找不到...

    struts2错误集合.txt

    错误信息:“There is no result type defined for type 'json' mapped with name 'success'”。这意味着在`struts.xml`文件中没有正确定义JSON类型的处理结果。需要检查配置文件中的定义是否正确。 以上内容涵盖...

    struts2.5+框架使用通配符与动态方法常见问题小结

    * There is no Action mapped for namespace [/] and action name [test-update] associated with context path [/Struts2_01]. 这些错误提示通常是由于映射问题引起的。解决这些问题的步骤是: 1. 先排查访问的...

    Struts2+Hibernate实现一对多联表查询

    在Java Web开发中,Struts2和Hibernate是两个非常重要的框架。Struts2是一个MVC(Model-View-Controller)框架,它负责处理用户请求,控制业务逻辑,并将数据传递给视图展示;而Hibernate则是一个对象关系映射(ORM...

    ibatis+struts2开发

    1. **Action调用Service**:在Struts2的Action中,通过依赖注入或者工厂模式获取Service实例,然后调用Service中的方法。 2. **Service调用DAO**:Service层方法进一步调用DAO(Data Access Object)层的方法,这里...

    spring+struts2+hibernate 一对多增删改查

    在IT行业中,SSH框架组合(Spring、Struts2和Hibernate)是Java Web开发中的经典选择,尤其适用于构建复杂的业务逻辑和数据管理应用。本项目"spring+struts2+hibernate 一对多增删改查"聚焦于这三大框架在处理一对多...

    weblogic安装部署以及常见问题解决

    6. **"There is no Action mapped for namespace / and action name."**:此问题通常出现在Struts应用中,检查`struts-config.xml`或`struts2.xml`配置文件,确保Action的namespace和name配置无误。 7. **java.lang...

    mappedBy属性:one2many

    在Java对象关系映射(ORM)框架中,Hibernate是一个广泛使用的工具,它允许开发者将数据库操作转换为对Java对象的操作。在处理一对多(One-to-Many)关系时,`mappedBy`属性扮演了关键角色。这篇博客文章,虽然描述...

    mybatisMapped报错 Statements collection does not contain value for

    在使用MyBatis框架进行数据库操作时,可能会遇到“Mapped Statements collection does not contain value for”这样的错误提示。这通常意味着MyBatis无法找到与指定的ID相对应的映射语句。下面将详细解释这个问题的...

    外文翻译 stus MVC

    There is no flow logic, no business logic, and no model information -- just tags. Tags are one of the things that make Struts unique compared to other frameworks like Velocity. Note: "Think thin" ...

    Memory-Mapped Files for Qualcomm Brew

    ### Memory-Mapped Files for Qualcomm Brew #### 作者:Ray Rischpater 在现代无线手持设备的开发过程中,内存管理始终是一项重要的考虑因素。尽管近年来移动设备的内存容量有了显著提升,但有效的内存管理和利用...

Global site tag (gtag.js) - Google Analytics