Question

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:

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top