Creating a test_users in the MySQL database table data, add three fields: id, user, password. And enter a few records.
Define a login.html, defined inside two request field: user, password. Sending a request to loginServlet
Creating a LoginServlet (need to inherit from HttpServlet, and override its doPost method),
In which the acquisition request user, password
Using JDBC query from test_users there is no user inputs and page, password corresponding to the record
If, in response Hello: xxx, if there is no response Sorry: xxx xxx is user.