You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nick Broadhurst <ho...@gmail.com> on 2016/05/23 01:01:18 UTC

Passing Query String to Action through Interceptor

Hello,

I have an interceptor that is working fine except the query string is not
being passed on to the action from the interceptor.

<action name="EditIroCase" class="iro.action.IroCaseAction">
            <interceptor-ref name="authIro"/>
            <result name="success">iro/IroCaseFORM.jsp</result>
 </action>


URL: http://..../EditIroCase.action?id=123

Action is an existing one that I am adding the interceptor to. Implementing
ParamAware to get ID from URL and that works fine. Tried a couple different
things, but can't seem to make it work. Used lots of interceptors, just
never needed to maintain a param across its execution.

Thanks,

Nick

Re: Passing Query String to Action through Interceptor

Posted by Nick Broadhurst <ho...@gmail.com>.
Wow!

I am embarrassed I did not know that and had not come across it yet. Of
course it resolved the issue.

Thank you very much,

Nick

On Mon, May 23, 2016 at 1:39 AM, Lukasz Lenart <lu...@apache.org>
wrote:

> 2016-05-23 3:01 GMT+02:00 Nick Broadhurst <ho...@gmail.com>:
> > Hello,
> >
> > I have an interceptor that is working fine except the query string is not
> > being passed on to the action from the interceptor.
> >
> > <action name="EditIroCase" class="iro.action.IroCaseAction">
> >             <interceptor-ref name="authIro"/>
>
> This will overwrite defined default stack - you can create a custom
> stack or add reference to existing stack
>
> <action name="EditIroCase" class="iro.action.IroCaseAction">
>             <interceptor-ref name="authIro"/>
>             <interceptor-ref name="defaultStack"/>
>             <result name="success">iro/IroCaseFORM.jsp</result>
>  </action>
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Passing Query String to Action through Interceptor

Posted by Lukasz Lenart <lu...@apache.org>.
2016-05-23 3:01 GMT+02:00 Nick Broadhurst <ho...@gmail.com>:
> Hello,
>
> I have an interceptor that is working fine except the query string is not
> being passed on to the action from the interceptor.
>
> <action name="EditIroCase" class="iro.action.IroCaseAction">
>             <interceptor-ref name="authIro"/>

This will overwrite defined default stack - you can create a custom
stack or add reference to existing stack

<action name="EditIroCase" class="iro.action.IroCaseAction">
            <interceptor-ref name="authIro"/>
            <interceptor-ref name="defaultStack"/>
            <result name="success">iro/IroCaseFORM.jsp</result>
 </action>


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

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