First of all, i dont speak or write in english very well. I have a database named sales. And in sales, i have a table named User. In User, i have values named serial no., username, password and role. Role is given by choosing an option in a drop down list either Admin or User from a java server page. And it is stored in User table. What i want is if a username with an admin role log in, that username will enter a different jsp than the username with a User role. for example once user ABC with an Admin role log in, he will enter A.jsp but if user ABCD with User role log in, he will enter B.jsp. Thanks.
The best solution is to implement JAAS where you can assign for each page a security role and if a user is accessing a page outside his security he will be redirected to the login page automatically.
The configuration of the security roles is done in the web.xml.
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop