Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java 3(MAKE SURE THIS WORKS IN INTELIJ) Build a simple Servlet called MyServlet. Add this Servlet to you ChattBank Project. This MyServlet will display a

Java 3(MAKE SURE THIS WORKS IN INTELIJ)

Build a simple Servlet called MyServlet. Add this Servlet to you ChattBank Project. This MyServlet will display a message like Go Braves in a simple

tag. Run this servlet from a Browser window by typing in the servlet name in the URL line.

(ie. http://localhost:8080/ChattBank/MyServlet). Make sure that your Server is up and running before you test this Servlet. The best way to do this is just Run your ChattBank Project once before you test the Servlet. Running the Project will start the Server.

build a simple Servlet called LoginServlet in your ChattBank Project. Now make it so that when the Customer logs in, the LoginServlet will get called and will validate the user id and password.

At first, just make sure that the Servlet gets called correctly. So just print a simple message like LoginServlet Running.

Remember, to call the LoginServlet, you will need to modify the FORM tag in the Login.html file:

Test it out. When you click the Login Button on the LoginForm, you should see LoginServlet Running.

Modify the LoginServlet.

Make it so that when the Servlet gets called, it reads the id and password from the Login Form. Use : request.getParameter() to get these items. At first just read in these 2 strings and display them to the Server Log.

If the id = admin and the Password = 123, return an HTML page that says Valid Login.

If not return an HTML page that says InValid Login. Use out.println() to send these HTML messages.

Test out your WebApp.

Create a new LoginServletDB. This time we are going to go to the database to verify the user login. First look at the ChattBank database. There is a Customers table. In this table there is a UserID and a Passwd.

Write the database code, in your LoginServlet to let anyone of these customers login, using their own ids and passwords.(Hint: You will need to add all 6 database steps[Load Driver, get connection.] to your LoginServletDB. Then get the password from the database abd compare it to the one you read from the HTML file.

Remember, to call the LoginServletDB, you will need to modify the FORM tag in the Login.html file:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. Support and enliven your speech with effective research

Answered: 1 week ago

Question

3. Choose an appropriate topic and develop it

Answered: 1 week ago