Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor spelling/grammar fixes.

...

Let's look at an example. The following is a simply simple interceptor that "logs" a message before and after every lifecycle stage:

...

In fact interceptors can decide to skip a stage entirely, or even abort execution early by returning a Resolution. When an interceptors interceptor does this, the resolution is executed and the rest of the lifecycle is omitted.

...

Code Block
languagexml
title"Configuring Interceptors in the web.xml (Stripes 1.5 and up)"
<init-param> 
    <param-name>Interceptor.Classes</param-name> 
    <param-value> 
        com.myco.NoisyInterceptor 
    </param-value> 
</init-param> 
</filter> 

...

Code Block
languagexml
title"Configuring Interceptors in the web.xml (Stripes 1.4.x and earlier)"
 <init-param> 
    <param-name>Interceptor.Classes</param-name> 
    <param-value> 
        com.myco.NoisyInterceptor, 
        net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor
    </param-value> 
</init-param> 
</filter> 

...

The SpringInterceptorSupport class is a simple base class that provide provides Spring bean injection into custom interceptors. Otherwise there is no difference between extending SpringInterceptorSupport and implementing Interceptor directly.