wt., 21 cze 2022 o 11:56 Prasanth <dbad...@pangburngroup.com> napisał(a):
>
> I need an id added to the link as a param (coming from prior action), so
> have used a JSP forward. If I use redirect type and specify the url in
> the struts.xml itself would I be able to specify the dynamic id provided
> by prior action?

Here you have a few examples
https://struts.apache.org/core-developers/redirect-action-result
basically you just need to specify ID param with a reference to a getter:

<package name="public" extends="struts-default">
    <action name="login" class="...">
        <result type="redirectAction">
            <param name="actionName">dashboard</param>
            <param name="namespace">/secure</param>
            <param name="id">${id}</param> // -> it will call action's getId()
        </result>
    </action>
</package>


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

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

Reply via email to