Question: Write a servlet program (.java file) that will: When you enter a first name John, a last name Doe, click on the radio button Male

Write a servlet program (.java file) 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. (15 points)
  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. (10 points)
  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. (10 points)

You should consider the following error cases where an appropriate error message should be displayed on the webpage:

  1. User doesnt enter text for first name and last name (10 points).
  2. When either a first name or a last name is not entered and the user clicks on the Submit button. (5 points)
  3. When no radio button is checked and the user clicks on the Submit button. (5 points)

There are 10 points for aesthetics and creativity. 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!!

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 Databases Questions!