Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Interceptors allow you to define code to be executed before and/or after the execution of an action. Interceptors can be a powerful tool when writing web applications. Some of the most common implementations of an Interceptor might be:

  • 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 "packages". 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.

For further Reading on Interceptors, see Xwork Interceptors
For further Reading on Xwork configuration files, see Xwork Configuration

...