I am in need of a way of executing multiple struts actions with one request. The goal is to minimize the need of request against the server. So what i need is something like a "MultiAction" which gets a list of actions as its parameters which it should execute and then return a "combined" result of this actions.
For example:
So my questions are:
This can be achieved by using "redirectAction" in result type. following code is the example for same. you have to configure action tag in struts XML according to your requirement of using nested Actions.
<action name="userHomeAction" class="com.etp.connect.struts.action.UserHomeAction">
<result type="redirectAction" name="SUCCESS_EDIT">
<param name="actionName">getUserEditData</param>
<param name="selectedUser">${selectedUser}</param>
</result>
<result name="error">/jsp/userMgmt/Users_Home.jsp</result>
<result name="login">/jsp/loginMgmt/Login.jsp</result>
</action>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With