Question: Design a HTML document that will display the following: A header that reads Please enter your name Two text boxes with labels 'First Name' and

Design a HTML document that will display the following:

  1. A header that reads "Please enter your name"
  2. Two text boxes with labels 'First Name' and 'Last Name'
  3. Three radio buttons and a label "Gender" all in a single row. The labels for the radio buttons will be: "Male", "Female" and "Other"
  4. A button with text "Submit"

Design a servlet program that will:

  1. When you enter a first name "John", a last name "Doe", click on the radio button "Male" and click on the button "Submit", display a response on the webpage "Welcome to my shop" as a header and a message "Thank you Mr. John Doe."
  2. When you enter a first name "Jane", a last name "Doe", click on the radio button "Female" and click on the button "Submit", a response on the webpage will display "Welcome to my shop" as a header and a message "Thank you Ms. Jane Doe."
  3. When you enter a first name "John", a last name "Doe", click on the radio button "Other" and click on the button "Submit", a response on the webpage will display "Welcome to my shop" as a header and a message "Thank you John Doe."

You should consider the following error cases where a message dialogue box should show appropriate message:

  1. User doesn't enter text for first name and last name
  2. When either a first name or a last name is not entered and the user clicks on the "Submit" button.
  3. When no radio button is checked and the user clicks on the "Submit" button.

Keep the project aesthetical and creative. Usually this includes user friendly webpage. The look and feel of it. Placing of the components in an appropriate flow. Use of colors and fonts to beautify the presentation. Be creative!!

Note:

Name your html document: Main.html.

Name your servlet class: Main.java

Answer: Main.html

Answer: Main.java

Answer: Screen shots

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!