You can use the params
parameter of redirect
which takes a map of parameters that get appended to the url.
E.g.:
redirect controller: 'login', action: 'auth', params: [successMessage: 'Created']
/edit:
To answer the question in the comments (in this case how can i compare value of successMessage in new url?):
Within the controller you can then check the value of successMessage
using params.successMessage
:
def myAction() {
if (params.successMessage == 'Created') {
...
}
}