Could you use a global-result?

http://struts.apache.org/2.x/docs/result-configuration.html#ResultConfiguration-GlobalResults

I would just think up a unique name for the set of conditions that
should cause the redirect. Then, configure that string as a
global-result and write your interceptor to do the check and return
the string if the conditions are met and action.invoke otherwise.

-Wes

On Mon, Jun 8, 2009 at 10:09 AM, Mitchell,
Steven<steven.mitch...@umb.com> wrote:
> I need to put an interceptor after the cookie interceptor that will send
> the user to a preference page if a preference cookie is missing rather
> than let the desired action fire--like a guard condition. If I was using
> a Filter I would just do a redirect.
>
> Eventually I will also add a Flash shared object as a back-up to the
> cookie, so I'll need to put a Flash shared object interceptor in the
> stack too. The "redirector" interceptor would check the cookie and flash
> token values put set by the previous interceptors in the stack. If both
> are missing, then a different action needs to fire.
>
> Where can I find an example of an interceptor that conditionally
> "redirects" the user to an alternate action? I'm having trouble
> picturing how the plumbing would work and I think an example of this
> kind would be a big help.
>
> Steve Mitchell
> http://www.ByteworksInc.com
>
>
> ------------------------------------------------------------------------------
> NOTICE:  This electronic mail message and any attached files are 
> confidential.  The information is exclusively for the use of the individual 
> or entity intended as the recipient.  If you are not the intended recipient, 
> any use, copying, printing, reviewing, retention, disclosure, distribution or 
> forwarding of the message or any attached file is not authorized and is 
> strictly prohibited.  If you have received this electronic mail message in 
> error, please advise the sender by reply electronic mail immediately and 
> permanently delete the original transmission, any attachments and any copies 
> of this message from your computer system. Thank you.
>
> ==============================================================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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

Reply via email to