Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails: Redirect to index.gsp that is not in any controller

Tags:

grails

In Grails, how do I redirect to my home page (index.gsp) which is not part of any controller?

like image 257
Orca Ninja Avatar asked Jun 21 '12 18:06

Orca Ninja


2 Answers

You can do a redirect to '/' like this:

redirect(uri:'/')
like image 132
proflux Avatar answered Nov 11 '22 09:11

proflux


Why do you need a redirect instead of a render? redirect(uri:'/index.gsp') might do the trick but I think I would just render(view:'/index')

like image 37
doelleri Avatar answered Nov 11 '22 08:11

doelleri