Fork me on GitHub
Edit on GitHub << back to Result types

Chain Result

Since Struts 7.6.0 the Forward Result is the recommended replacement: the target must opt in and only explicitly named values cross over. chain is planned to be deprecated in Struts 7.7.0 and removed in Struts 8.0.0, see Migrating from chain.

This result invokes an entire other action, complete with it’s own interceptor stack and result.

Parameters

Examples

<package name="public" extends="struts-default">
    <!-- Chain creatAccount to login, using the default parameter -->
    <action name="createAccount" class="...">
        <result type="chain">login</result>
    </action>
 
    <action name="login" class="...">
        <!-- Chain to another namespace -->
        <result type="chain">
            <param name="actionName">dashboard</param>
            <param name="namespace">/secure</param>
        </result>
    </action>
</package>
 
<package name="secure" extends="struts-default" namespace="/secure">
    <action name="dashboard" class="...">
        <result>dashboard.jsp</result>
    </action>
</package>
Follow @x