• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to implement login mechanism like JavaRanch has  RSS feed

 
ak sinha
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have queries regarding how we can implement login mechanism as like JavaRanch has.
For example in between of any page if you click on "login" link it will get you back to login page... after credentials verification it will take you back to the same older page. How can we implement this functionality?

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember the original URL in a cookie or in the session. After login, redirect back to that URL.
[ January 28, 2008: Message edited by: Bear Bibeault ]
 
ramu taraka
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its better ot implement as an request parameter like maintain a parameter with the key as "redirect" and the value as the redirect url...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ramu taraka:
its better ot implement as an request parameter

More cumbersome I'd say. Then you have to create hidden inputs to carry the value forward. I prefer the cleanliness of the session.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!