• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re-directing to the correct page - Grails

 
Harjit Singh
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have a gsp page which is associated with a controller class. The controller handles the login. When the login happens I re-direct it to a different view. When I hit the back button the login page appears again. How should I handle this

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way is have your action that is initially rendering your login page check to see if the user is already logged in, and if so, redirect appropriately.

On a side note params['login'] can be written as params.login. A bit less typing involved. ;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic