Documente Academic
Documente Profesional
Documente Cultură
*Output:
Week-8
Module-1: User Authentication
Aim: Assume four users user1, user2, user3 and user4 having the
passwords pwd1, pwd2, pwd3 and pwd4 respectively.
To Write a servlet for doing the following:
1. Read the user id and passwords entered in the Login form and
authenticate with the values (user id and passwords) available in
the database.
2. If he is a valid user (i.e., user - name and password match) you
should welcome him by name(user-name) else you should display
“You are not an authenticated user”.
Description: Login page is created with fields Username and Password
with on submit redirect to other pages using URL pattern.
Source Code: login.html
*Output:
*Output:
Description: If the user submits the form without entering the fields an
error message is displayed along with the login form.
Source code: error4.html
*Output:
*Output
*Output: