So I have a mySQL database with a ‘users’ table which includes a username, password, and a boolean for admin or user.
I am using Struts and JSP to validate User/Password combinations, and my Java files are “Session Aware” (for what it’s worth).
My question is: After I have validated the combination, and sent the user to a /secure/ namespace with interceptors checking for validation and all that… how can I let my webapp know if the user is an admin or not. This can be accessed through the SQL at any time, but I would like to divert the 2 to different jsp files (eg. user.jsp and admin.jsp) for different functionalists.
Thanks 🙂
P.S. A detailed explanation with an example would help me more than a conceptual how-to.
So in the end, I did just that:
and then in the struts I just substituted.