...
Interceptors are implemented as Java classes, so each Interceptor has a 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> |
...
but any action may also define its own local stack.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<action name="VelocityCounter" class="org.apache.struts2.example.counter.SimpleCounter"> <result name="success">...</result> <interceptor-ref name="defaultComponentStack"/> </action> |
...