Part I – Build asimple Servlet called MyServlet using NetBeans. Addthis Servlet to you “ChattBank†Project. This MyServletwill display a message like “Go Braves†in a simple
tag.Run this servlet from a Browser window by typing in the servletname in the URL line.
(ie. http://localhost:8080/ChattBank/MyServlet). Make sure thatyour Server is up and running before you test this Servlet. Thebest way to do this is just Run your “ChattBank†Project oncebefore you test the Servlet. Running the Project will start theServer.
Part II – Next, build a simple Servletcalled LoginServlet in your “ChattBank†Project. Nowmake it so that when the Customer logs in, the LoginServlet willget called and will validate the user id and password.
- At first, just make sure that the Servlet gets calledcorrectly. So just print a simple message like “LoginServletRunning…â€.
- Remember, to call the LoginServlet, you will need to modify theFORM tag in the “Login.html†file:
- Test it out. When you click the Login Button on theLoginForm, you should see “LoginServlet Running….â€
Part III – Now, modify theLoginServlet.
- Make it so that when the Servlet gets called, it reads the idand password from the Login Form.
Use :Â Â Â request.getParameter() to get these items. At first just read inthese 2 strings and display them to the Server Log.
2.) If the id = “admin†and thePassword = “123â€, return an HTML page    thatsays “Valid Loginâ€.
3.) If not return an HTML page thatsays “InValid Loginâ€. Use out.println() to send these HTMLmessages.
    4.) Test out yourWebApp.           Â
Part IV– Lastly, modify theLoginServlet. This time we are going to go to thedatabase to verify the user login. First look at the ChattBankdatabase. There is a Customers table. In this table there is aUserID and a Passwd. Write the database code, in your LoginServletto let anyone of these customers login, using their own ids andpasswords.   Â