i have 3 user types in my database as follows : admin,buyer and seller.
i want to create a login.jsp page. in this page if admin logged in then it should redirect to admin.jsp.
if buyer logged in then it should redirect to buyer.jsp and for seller it should redirect to seller.jsp.
it simply means that i want to use one login page for each user type and redirect to appropriate jsp page according to the user type.
I believe the user needs to first login, right? When the user submits his/her details in the login page, the request goes to a servlet, the servlet receives the userid and password, validates these details against the values stored in underlying database, and if valid checks the user_type variable value, and based on this value the user gets redirected to the specific page.
posted 8 years ago
Select userType from user where userName = 'john' and password = 'xyz'