2016-03-06 15:36 GMT+01:00 Greg Huber <gregh3...@gmail.com>:
> I think we are OK on this, as I can see from the example that the default
> stack is included.  So it would work like this.
>
> Initially I did not include the default which is why it was not working.
> Although the docs are a bit vague on how the store should be used,
> including the default is required.
>
>         <action name="HelloWorld1"
> class="org.apache.struts.example.HelloWorld1">
>             <interceptor-ref name="default"/>
>             <interceptor-ref name="store">
>                 <param name="operationMode">AUTOMATIC</param>
>             </interceptor-ref>
>
>             <result type="redirectAction">HelloWorld2</result>
>
>         </action>

Basically you just need to define "store" interceptor (with assumption
that the session was already created elsewhere), you don't need to
reference any other stack, there is no such requirement. In most cases
you don't need all the interceptors defined in a stack, just two or
three to handle what is needed for action. And in the same way "store"
interceptor works. In "STORE" mode more things is required ie.
Validation, Workflow, to perform validation and store messages in the
session, that's why there is a reference to the "defaultStack" in the
example. In "RETRIEVE" mode only session is needed (but it was already
created in "STORE" step) and nothing else to fetch messages from the
session and put them in scope, that's why only "store" interceptor is
referenced in the "RETRIEVE" step.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to