It is important to remember that this interceptor does nothing if there are no objects already on the stack. This means two things:

you can safely apply it to all your actions without any worry of adverse affects.

it is up to you to ensure an object exists in the stack prior to invoking this action. The most typical way this is done is through the use of the <b>chain</b> result type, which combines with this interceptor to make up the action chaining feature.

By default Errors, Field errors and Message aren't copied during chaining, to change the behaviour you can specify the below three constants in struts.properties or struts.xml:

struts.xwork.chaining.copyErrors - set to true to copy Action Errors

struts.xwork.chaining.copyFieldErrors - set to true to copy Field Errors

struts.xwork.chaining.copyMessages - set to true to copy Action Messages

Example:

Parameters

excludes (optional) - the list of parameter names to exclude from copying (all others will be included)

includes (optional) - the list of parameter names to include when copying (all others will be excluded)

Extending the Interceptor

There are no known extension points to this interceptor.

Examples

Simple example how to chain two actions

This examples chains two actions but only one property from first action is copied to another