This code works fine for me. However we want that the users should be redirected to different pages depeding on their roles which the user selects from a drop down box while logging in. Could any one please tell me how to do that.
Hi,
You can opt one more solution. Try putting user roles in your user table in database. Now when user will log into your system, check their role and populate it into bean. This way, user bean will always be having their associated role. Put this bean in session scope.
Now after login functionality simply redirect user to a common url using the same code as peter said.
Use a filter to authenticate user to access particular resource like your jsp & servlets. Because you have user bean in session you can always check its role and corresponding url that can be accessed by that particular user..
let me see if your problem is solved or not.
have a nice time
regards
sam.n
I tried this code but am not logging in successfully, when i key in the username and pwd am getting an error called The requested resource not found. Please help me to solve this, its very urgent.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.