Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving a link  RSS feed

 
Marilyn de Queiroz
Sheriff
Posts: 9079
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to click on a link. If I'm not logged in, I'm re-routed to the login page. Upon successful authentication, I'd like to go directly to the url in the link I clicked on originally. How can I do that?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
something like this?
http://www.caucho.com/resin-3.0/security/tutorial/security-basic/index.xtp
[ July 01, 2005: Message edited by: Eric Pascarello ]
 
Marilyn de Queiroz
Sheriff
Posts: 9079
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether you use declarative security or programmatic security, it seems that after the user is logged in, he is taken to a specific "home page". I want, instead, to go to the page the user was originally trying to get to.
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set a variable on the session that contains the URL the person requested before you give them the permission denied / login screen. Then once they are logged in, if this variable is set, simply forward them on to it.

For the first part use request.getRequestURI()
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!