Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect to different controller in groovy/grails

I am working with groovy/grails technology, in that from one of the action called changepassword of LoginController, I want redirect at LogoutController's index action..

What should be done to achieve that ?

Thanks in advance...

like image 829
Nirmal Avatar asked Feb 17 '11 10:02

Nirmal


3 Answers

When in a login controller you can use the following in your action to redirect to another action on a different controller:

redirect(controller: 'logout', action:'index')
like image 79
mfloryan Avatar answered Oct 14 '22 19:10

mfloryan


May be the official documentation will be useful? this

like image 3
Sergey Vedernikov Avatar answered Oct 14 '22 20:10

Sergey Vedernikov


See Controller Dynamic Methods - as simple as redirect(action: 'index')

like image 2
Victor Sergienko Avatar answered Oct 14 '22 19:10

Victor Sergienko