You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Baranski <li...@secmgmt.com> on 2009/09/09 18:12:57 UTC

Interceptor question

I have a question about an interceptor.

If I run an interceptor on an action, then redirect, is the same interceptor
run on the redirected-to action?

I'm redirecting to a change password page if a password is over x days old,
so do I need to specify a different interceptor stack for the change
password action to prevent an infinite loop of redirection?

Thanks,
Mike.




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


Re: Interceptor question

Posted by mu...@aol.com.
 By the way, Pawel, at that link some software seems to have severely butchered your xml
in the struts.xml part.


 


Chris

 


 

-----Original Message-----
From: Dale Newfield <da...@newfield.org>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Wed, Sep 9, 2009 12:41 pm
Subject: Re: Interceptor question









Paweł Wielgus wrote: 

> Mike You can take a look at my post about this problem [1] 

> and read more about Spring Security (ACEGI). 

> 
> [1] - http://poulwiel.blogspot.com/2009/01/intercepting-all-actions-inside-my-app.html 
 

I don't understand what your problem is.  As you state, you can set the 
interceptor stack for each package, and you have two separate packages 
that you want to have two separate interceptor stacks.  You also 
illustrate how the interceptor can make decisions based on the mapping. 
 What's the problem? 
 

-Dale 
 


--------------------------------------------------------------------- 

To unsubscribe, e-mail: user-unsubscribe@struts.apache.org 

For additional commands, e-mail: user-help@struts.apache.org 



 


Re: Interceptor question

Posted by Dale Newfield <da...@newfield.org>.
Paweł Wielgus wrote:
> Mike You can take a look at my post about this problem [1]
> and read more about Spring Security (ACEGI).
> 
> [1] - http://poulwiel.blogspot.com/2009/01/intercepting-all-actions-inside-my-app.html

I don't understand what your problem is.  As you state, you can set the 
interceptor stack for each package, and you have two separate packages 
that you want to have two separate interceptor stacks.  You also 
illustrate how the interceptor can make decisions based on the mapping. 
  What's the problem?

-Dale


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


Re: Interceptor question

Posted by Paweł Wielgus <po...@gmail.com>.
Hi all,
Mike You can take a look at my post about this problem [1]
and read more about Spring Security (ACEGI).

[1] - http://poulwiel.blogspot.com/2009/01/intercepting-all-actions-inside-my-app.html

Best greetings,
Paweł Wielgus.


2009/9/9 Dale Newfield <da...@newfield.org>:
> Mike Baranski wrote:
>>
>> If I run an interceptor on an action, then redirect, is the same
>> interceptor
>> run on the redirected-to action?
>
> "then redirect" means that request is done, and the browser will be
> submitting a new request.  That new request gets processed according to the
> action/interceptor definition appropriate to the url.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Interceptor question

Posted by Dale Newfield <da...@newfield.org>.
Mike Baranski wrote:
> If I run an interceptor on an action, then redirect, is the same interceptor
> run on the redirected-to action?

"then redirect" means that request is done, and the browser will be 
submitting a new request.  That new request gets processed according to 
the action/interceptor definition appropriate to the url.

-Dale

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


Re: Interceptor question

Posted by Dale Newfield <da...@newfield.org>.
Wes Wannemacher wrote:
> If the action you are redirecting to has the same interceptor-stack
> (via package inheritance or interceptor configuration), then the
> answer is 'yes'

So the answer is to not put this "force to password change page" 
interceptor in the stack used for the password change page, or make that 
interceptor a no-op if the appropriate action is already about to be 
invoked.

-Dale

> On Wed, Sep 9, 2009 at 12:12 PM, Mike Baranski
> <li...@secmgmt.com> wrote:
>> I have a question about an interceptor.
>>
>> If I run an interceptor on an action, then redirect, is the same interceptor
>> run on the redirected-to action?
>>
>> I'm redirecting to a change password page if a password is over x days old,
>> so do I need to specify a different interceptor stack for the change
>> password action to prevent an infinite loop of redirection?
>>
>> Thanks,
>> Mike.
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 


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


Re: Interceptor question

Posted by Wes Wannemacher <we...@wantii.com>.
If the action you are redirecting to has the same interceptor-stack
(via package inheritance or interceptor configuration), then the
answer is 'yes'

-Wes

On Wed, Sep 9, 2009 at 12:12 PM, Mike Baranski
<li...@secmgmt.com> wrote:
> I have a question about an interceptor.
>
> If I run an interceptor on an action, then redirect, is the same interceptor
> run on the redirected-to action?
>
> I'm redirecting to a change password page if a password is over x days old,
> so do I need to specify a different interceptor stack for the change
> password action to prevent an infinite loop of redirection?
>
> Thanks,
> Mike.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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