【问题标题】:path attribute of forward tag in struts-config.xml filestruts-config.xml 文件中 forward 标签的 path 属性
【发布时间】:2013-11-07 14:44:33
【问题描述】:
<action-mappings>
        <action name="loginAction" path="/loginAction"
            type="com.xx.yy.actions.LoginAction" scope="request"
            validate="false">
            <forward name="landingPage" path="landingpage" />
            <forward name="error" path="errorpage" />
        </action>

        <action name="admin" path="/adminAction"
            type="com.xx.yy.actions.AdminHome" scope="request"
            validate="true" input="/jsp/login.jsp">
            <forward name="success" path="/jsp/admin/admin.jsp" />
            <forward name="failure" path="/jsp/admin/admin.jsp" />
        </action>
</action-mappings>

上面代码中forward标签的path属性是loginAction的landingpage。 那么在这种情况下,控制会转到哪个页面或操作?在这种情况下,什么是登录页面?是 jsp 还是其他操作?

在转发标签的管理动作路径属性是jsps,因此很明显控制将根据动作类中的逻辑被定向到jsp。

【问题讨论】:

  • 取决于action返回的结果。
  • 是的瓷砖在那里..

标签: struts


【解决方案1】:

在那一行...

<forward name="landingPage" path="landingpage" /> 

...path 属性可能是Apache Tiles 配置名称。

【讨论】:

    猜你喜欢
    • 2012-10-29
    • 2012-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-25
    • 1970-01-01
    • 2011-02-14
    相关资源
    最近更新 更多