Nirmal
Nirmal

Reputation: 4829

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...

Upvotes: 5

Views: 8650

Answers (3)

Sergey Vedernikov
Sergey Vedernikov

Reputation: 7754

May be the official documentation will be useful? this

Upvotes: 3

mfloryan
mfloryan

Reputation: 7685

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')

Upvotes: 10

Victor Sergienko
Victor Sergienko

Reputation: 13495

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

Upvotes: 2

Related Questions