【问题标题】:Struts 1.3 Passing undeclared value to mapping.findForawardStruts 1.3 将未声明的值传递给mapping.findForaward
【发布时间】:2013-02-27 04:47:17
【问题描述】:

在 Struts 1.3 Action 类中,我们将值返回为

return mapping.findForward("success");

如果该动作的动作标签中未定义“成功”会发生什么

   <action path="/helloWorld"
    type="com.action.HelloWorldAction"
    name="helloWorldForm">
    <forward name="good" path="/Good.jsp"/>
    <forward name="bad" path="/Bad.jsp"/>
   </action>

【问题讨论】:

  • 你尝试的时候发生了什么?

标签: mapping struts-1 struts-action


【解决方案1】:

findForward 方法查找您使用操作映射定义的命名转发。由于您没有为“成功”定义转发名称,它应该给出空白页。

【讨论】:

    【解决方案2】:

    您将被转到一个空白页面。

    【讨论】:

      猜你喜欢
      • 2016-09-30
      • 2020-12-23
      • 2011-10-15
      • 2017-10-24
      • 2016-07-19
      • 1970-01-01
      • 2014-02-09
      • 2017-05-28
      • 1970-01-01
      相关资源
      最近更新 更多