Write a servlet that enables the user to change the password from an HTML form, as shown

Question:

Write a servlet that enables the user to change the password from an HTML form, as shown in Figure 37.30a. Suppose the user information is stored in a database table named Account with three columns: username, password, and name, where name is the real name of the user. The servlet performs the following tasks:

a. Verify that the username and old password are in the table. If not, report the error and redisplay the HTML form.

b. Verify that the new password and the confirmed password are the same. If not, report this error and redisplay the HTML form.

c. If the user information is entered correctly, update the password and report the status of the update to the user, as shown in Figure 37.30b.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: