Thursday, December 11, 2008

Grails - Acegi - Set a custom after Logout page

Crate a new action with the following code and set it as the action for your logout button.

(in this example the after logout paage is itemPrice/listDOA)

Code:

import javax.servlet.http.HttpSession

class LogoutController {

...

action {
HttpSession s = request.getSession()
s.invalidate()
redirect(controller:"itemPrice", action:"listDOA") // this is the new after
}
}

No comments:

Post a Comment