How to redirect 2 different pages after j_security_check

1.6k Views Asked by At

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?

1

There are 1 best solutions below

2
Barend On

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.