Mistakes in Stripes configuration reference (???)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mistakes in Stripes configuration reference (???)

Yakov Zhdanov
Reference says:

Property - Interceptor.Classes     

Value - The comma-separated list of fully qualified class names of Interceptor classes to use. The list may contain additional whitespace. Entries higher up the list will be invoked before entries lower down. Care should be taken when specifying this value to include the BeforeAfterMethodInterceptor if it is still desired.    

Default - net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor

web.xml:
....
<init-param>
          <param-name>Interceptor.Classes</param-name>
          <param-value>
                net.sourceforge.stripes.integration.spring.SpringInterceptor,
                net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor
          </param-value>
</init-param>
....

So, configured in such way Stripes  called methods annotated with @Before or @After twice.


web.xml:
....
<init-param>
          <param-name>Interceptor.Classes</param-name>
          <param-value>
                net.sourceforge.stripes.integration.spring.SpringInterceptor
           </param-value>
</init-param>
....

This configuration fixed the issue.

If you take a look on DefaultConfiguration class you'd see the following

/** Instantiates the core interceptors, allowing subclasses to override the default behavior */
protected Map<LifecycleStage, Collection<Interceptor>> initCoreInterceptors() {
        Map<LifecycleStage, Collection<Interceptor>> interceptors = new HashMap<LifecycleStage, Collection<Interceptor>>();
        addInterceptor(interceptors, new BeforeAfterMethodInterceptor());
        addInterceptor(interceptors, new HttpCacheInterceptor());
        return interceptors;
}

Does the documentation need to be updated?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Mistakes in Stripes configuration reference (???)

Freddy D.
> Does the documentation need to be updated?

Yes, you are correct. The documentation refers to Stripes 1.4.3.
Updates will be needed to reflect the changes made in Stripes 1.5.

Cheers,
Freddy


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Mistakes in Stripes configuration reference (???)

Ben Gunter
In reply to this post by Yakov Zhdanov
The docs as they are now pretty much apply to Stripes 1.4. The concept of core interceptors (of which there are now two) was introduced for 1.5. So yes, they need to be updated when 1.5 is officially released.

-Ben

Yakov Zhdanov wrote:
Reference says:

Property - Interceptor.Classes     

Value - The comma-separated list of fully qualified class names of Interceptor classes to use. The list may contain additional whitespace. Entries higher up the list will be invoked before entries lower down. Care should be taken when specifying this value to include the BeforeAfterMethodInterceptor if it is still desired.    

Default - net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor

web.xml:
....
<init-param>
          <param-name>Interceptor.Classes</param-name>
          <param-value>
                net.sourceforge.stripes.integration.spring.SpringInterceptor,
                net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor
          </param-value>
</init-param>
....

So, configured in such way Stripes  called methods annotated with @Before or @After twice.


web.xml:
....
<init-param>
          <param-name>Interceptor.Classes</param-name>
          <param-value>
                net.sourceforge.stripes.integration.spring.SpringInterceptor
           </param-value>
</init-param>
....

This configuration fixed the issue.

If you take a look on DefaultConfiguration class you'd see the following

/** Instantiates the core interceptors, allowing subclasses to override the default behavior */
protected Map<LifecycleStage, Collection<Interceptor>> initCoreInterceptors() {
        Map<LifecycleStage, Collection<Interceptor>> interceptors = new HashMap<LifecycleStage, Collection<Interceptor>>();
        addInterceptor(interceptors, new BeforeAfterMethodInterceptor());
        addInterceptor(interceptors, new HttpCacheInterceptor());
        return interceptors;
}

Does the documentation need to be updated?

------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________ Stripes-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/stripes-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users