Results 1 to 3 of 3

Thread: forward to certain page after login

  1. #1
    Join Date
    May 2006
    Posts
    2

    Default 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

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    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.

  3. #3
    Join Date
    May 2006
    Posts
    2

    Default

    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
  •