THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Security Checking (ensuring the user is logged in)
- Trace Logging (logging every action)
- Bottleneck Checking (start a timer before and after every action, to check bottlenecks in your application)
You can also chain Interceptors together to create an interceptor stack. If you wanted to do a login check, security check, and logging all before an Action call, this could easily be done with an interceptor package.
ExampleIntercepters must first be defined (to give name them) and can be chained together as a stack:
Code Block | ||||
---|---|---|---|---|
| ||||
<interceptors>
<interceptor name="security" class="com.mycompany.security.SecurityInterceptor"/>
<interceptor-stack name="defaultComponentStack">
<interceptor-ref name="component"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<action name="VelocityCounter" class="com.opensymphony.webwork.example.counter.SimpleCounter"> <result name="success">...</result> <interceptor-ref name="defaultComponentStack"/> </action> |
NOTE: Reference name can be either the name of the interceptor or the name of a stack
For more details, see Interceptors reference.
...