...
Interceptors are implemented as Java classes, and so each Interceptor has a unique class name. To make it easier to reference Interceptors, each class can be registered with the framework and given a unique, simpler name.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<interceptors> <interceptor name="security" class="com.company.security.SecurityInterceptor"/> <interceptor-stack name="secureStack"> <interceptor-ref name="security"/> <interceptor-ref name="defaultStack"/> </interceptor-stack> </interceptors> |
Individual Interceptors and Interceptors Stacks can be "mixed and matched" in any order when defining an Interceptor Stack.
The framework will invoke each Interceptor on the stack in the order it is defined.
Most applications will define a default Interceptor Stack, such as
<default-interceptor-ref name="secureStack"/>
but each any action can may also define its own local stack.
...