Ian Meikle wrote:
Hi Jeromy,
Thanks for the info.
Several of the interceptors require configuring, for example the Scope
interceptor.
The example provides some examples of this. However it seems that the only
way to configure a interceptor is to redefine an interceptor stack.
Is this correct ?
Can I not just use the default stack, and configure the specific
interceptor for a specific actions use ?
Regards
Ian
Hi Ian,
If you define your actions in Struts.xml you can include an
<interceptor-ref> tag that references an interceptor to use and/or
interceptor stack to use.
Order is important; you can insert an interceptor before or after the
stack. You can only insert interceptors into a stack by splitting the
stack definition.
Here's an example I frequently use to get achieve params-prepare-params
pattern. Params:
<action name="myAction" class="myClass">
<interceptor-ref name="params"/> <!-- allow prepare to
load info-->
<interceptor-ref name="user"/>
<result...>
If you're using annotations, as far as I know you need to setup a
package with an appropriate stack and reference the package.
The scope plugin allows you to use annotations to configure the scope
rather than the xml/package.
Does that help?
regards,
Jeromy Evans
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]