concept redirect in category grails
appears as: redirects, redirect, redirect, The redirect

This is an excerpt from Manning's book Grails in Action, Second Edition.
When everything is done, you redirect the user back to the timeline action
, which will rerender the timeline with the new post. Notice that the redirect includes the id param. This is important because the timeline action relies on having the user’s ID, and when you redirect programmatically (rather than typing in a browser URL), you need to explicitly provide the value. You now need to update your timeline.gsp file to output those error or success messages to the user.
We’ve used redirect() calls throughout our code. For example, we redirect back to the timeline at the end of the addPost action. When a default index action is called, we redirect to another one.
, which will rerender the timeline with the new post. Notice that the redirect includes the id param. This is important because the timeline action relies on having the user’s ID, and when you redirect programmatically (rather than typing in a browser URL), you need to explicitly provide the value. You now need to update your timeline.gsp file to output those error or success messages to the user.