0

I have a login page using j_security_check and I need to redirect to different pages depending on the user's privileges. For example, user A has to be redirected to page1 and user B to page2.

How can I do this using j_security_check?

Cœur
  • 37,241
  • 25
  • 195
  • 267
ErVeY
  • 1,524
  • 4
  • 16
  • 26

1 Answers1

1

Use a double redirect, i.e. have the j_security_check redirect back to the login page and then use a bit of logic (and the HttpSession data) to figure out where to redirect to from there.

Barend
  • 17,296
  • 2
  • 61
  • 80
  • I am a beginner. Could you please provide a small sample which can help me understand better? Thanks. – Bala Jan 24 '12 at 16:55
  • As far as I understand it's not possible to 'have j_security_check redirect back to the login page' – Andy Smith Mar 08 '12 at 13:41