-
Nov 16th, 2006, 01:24 PM
#1
forward to certain page after login
Hi,
My application has provision to select which page you want to be taken to after logging in. After a successful login, I need to be able to invoke a manager bean that will check the system parameters ( via a dao call ) and then redirect to the appropriate page. Right now, the defaultTargetURL is hard coded so after logging in you are taken directly to that page.
How would I go about implementing this ?
Thanks for your help...
Rohit
-
Nov 16th, 2006, 03:17 PM
#2
Why not change the defaultTargetURL to point to a controller (or in Struts land Action) instead of a page e.g. loggedin.do. That can look at the information and then forwards on to the right place.
-
Nov 16th, 2006, 04:36 PM
#3
Thanks a lot for that tip. For everyone's reference, here's what i did:
- Created a new controller that used a RedirectView to forward to the appropriate page
based on system parameters
- Modified security.xml and changed the defaultTargetUrl parameter to map to a new mapping which was handled by the new controller
- Also added a new property alwaysUseDefaultTargetUrl which is required for this to work.
Rohit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules