Difference between Action Chaining & Action redirect in Struts 2
In Struts 2, sometimes you may want to process another action when one action completes. For example on successfully submitting a form you want to render output from other action.
This can be done by two methods
1) Action Chaining
2) Action redirect
** UPDATE: Struts 2 Complete tutorial now available here.
Difference between Action redirect & Action Chaining:
Difference between Action Chaining & Action redirect is, Action Redirect starts from scratch, it is like you called the other action class for the first time while Action Chaining keeps the values of the first Action class on the value stack and adds the variables of the new action. Look at the example below to understand the above concepts.
Action Chaining:
dbAction /success.jsp
Action redirect:
dbAction /success.jsp
how about Difference
between Action Chaining & Redirect Action ?how about Difference between Action Chaining & Redirect Action ?
(type=”redirectAction” Vs type=”chain”)
Your article extremely nice! Thanks a lot
Thankyou for the feedback!
Hi,
This article of yours helped me a lot.
Thank you so much.
Most welcome:)