I have mongodb base with users and passwords. I have a jsp file with a form for authorization.
filter should be check – authorized user or not. Servlet should authorize user if he not authorized.
Please give simple examples of how to do it.
- how to verify an authorized user or
not? - The user is not logged. Suppose a
user is in the database. How it
authorize?
sorry for bad english.
Here’s a scenario:-
Userobject from session.Userobject exists, allow user to the secured page.Userobject doesn’t exist, redirect user to the login page.When the user submits the credential from the login page:-
Userobject in the session and displays welcome page.