【问题标题】:Struts2 one class with 2 result bug?Struts2 一类有 2 个结果错误?
【发布时间】:2019-03-12 10:07:29
【问题描述】:

我使用 struts 2 ,为 1 个类定义 2 个结果以输出 2 页代码:

public String init() throws SystemException {
    return "index";
}



public String emailVerify() throws SystemException {
        return "emailVerify";
    }

在struts xml上

<action name="RegisterAction_*" class="com.app.action.RegisterAction" method="{1}">
        <result name="index">/WEB-INF/jsp/app/user_register.jsp</result>
        <result name="emailVerify">/WEB-INF/jsp/app/user_email_verify.jsp</result>
    </action>

init 结果“成功确实有效,但 emailVerify 只有效 1 次,如果我重新加载页面它显示 struts 错误,这是一个错误吗?

【问题讨论】:

  • 没有足够的信息(或措辞不当)来提供帮助。

标签: java jsp servlets struts2


【解决方案1】:

已修复,此 mvc 有一个拦截器阻止非初始化请求

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-04-14
    • 1970-01-01
    • 2020-05-18
    • 1970-01-01
    • 2011-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多