Grails forwarding and/or redirection with parameters

echoblaze picture echoblaze · Nov 28, 2008 · Viewed 20.5k times · Source

Is it possible to do page forwarding in Grails? I searched but no luck. If possible, how do I pass parameters in the forwarding method? If not, how would I do it using redirection? I've found something like this for redirection so far:

Answer

Ken Gentle picture Ken Gentle · Nov 28, 2008

Redirection is idiomatically done in a controller in Grails. See the redirect method in the Grails User Guide

An example using parameters:

redirect(action:"show",id:4, params:[author:"Stephen King"])

You might also be able to accomplish a forward equivalent through the URL Mapping mechanism, including adding one or more parameters.