`

struts2中No result defined for action * and result success

阅读更多

 

登录提示:“No result defined for action * and result success”,星号是我的action类名,配置文件如下:

 

<struts> <package name=”default” extends=”struts-default”> <action name=”mylogin”> <result name=”success”>hello.jsp</result> <result name=”input”>index.jsp</result> </action> </package></struts>

如果不是程序本身的问题,那个出现这个错误应该是你添加了struts2-convention-plugin-2.1.8.1.jar这个包,这个包是用来实现struts2的零配置的,添加了这个包就必须使用namespace.
解决办法:
1.配置namespace

2.删除这个插件包
3.关闭插件功能
在 之前加上

分享到:
评论

相关推荐

    jsp\No result defined for action and result input.doc

    ### Struts2框架中“No result defined for action and result input”错误解析及解决方法 #### 错误概述 在Struts2框架中开发Web应用程序时,可能会遇到一个名为“No result defined for action and result input...

    No result defined for action.doc

    在IT领域,尤其是在Web开发中,遇到“No result defined for action”这类错误是常见的问题,尤其当使用Struts2框架时更为突出。此类错误通常指向在控制器(Action)中未正确配置或实现结果集(Result),导致请求...

    配置struts2常见错误

    No result defined for action ***Action and result success **问题描述**: 当执行某个Action后,出现“没有定义success结果”的错误。 **解决方法**: 这意味着在`struts.xml`中未正确配置`success`结果。为了...

    struts2错误集合.txt

    错误信息:“No result defined for action com.upload.UploadAction and result input”。 这个错误通常是由于配置文件中没有正确定义动作的结果导致的。确保在`struts.xml`中为每个动作定义了合适的`result`标签...

    我的JAVA开发工作笔记

    在提供的内容中提到了一个错误 `No result defined for action com.sxit.smxt.action.XXXAction and result input`。这意味着Struts2框架无法找到对应Action的`input`结果定义。 #### 解决方案: - **检查配置文件*...

    struts_2.3.12GA_API文档(chm版本)

    Stops the action invocation immediately (by throwing a PauseException) and causes the action invocation to return the specified result, such as Action.SUCCESS, Action.INPUT, etc. void ...

Global site tag (gtag.js) - Google Analytics