Redirect after post is a common pattern to hand control overt to another resource. The most common reason for using a redirect is the need to change the URL shown in the browser and to prevent the user to re-submit the previous request by clicking the reload-button.
example config in struts.xml: <action name="search" class="com.foo.SearchAction"> <result type="redirect-action">list</result> <result name="input">jsp/search.jsp</result> </action> <action name="list" class="com.foo.ListAction"> <result>jsp/list.jsp</result> </action> This seems to be straightforward. To persist data (the search result list) a session attribute in the session-scoped map could be used. As I read in "Struts 2 in Action", this could have a couple of drawbacks. What could be the problem with using the session scope as a data storage? What could be a good alternative besides using request parameters. for example: <action name="search" class="com.foo.SearchAction"> <result type="redirect-action"> [param name="actionName"]list[/param] [param name="param1"]searchList[/param] [param name="param2"]${searchResult}[/pararm] </result> <result name="input">jsp/search.jsp</result> </action> Dirk -- View this message in context: http://www.nabble.com/Redirect-after-Post-and-persist-data-tp20910311p20910311.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]