Friday, April 04, 2008

Redirect with parameters in Struts 2

Redirecting user with some parameters in Struts 2 can be achieved as following
<name="action" class="app.Action1">
<result name="success" type="redirect-action"><param name="actionName">listFriends
<param name="namespace">/pages
<param name="parse">true
<param name="param1">${model.param1}
</result>
</name="action">
For more elaboration on this refer to http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect
For elaboration on Struts Action mapping refer to
http://struts.apache.org/2.x/docs/action-configuration.html

0 comments:

Post a Comment