Testing the validation functionality
This section explains the testing of the validation
functionality.
Procedure
- Start the test environment.
- Navigate to the Stores > WebContent > Madisons_name directory.
- Right-click the index.jsp file and select Run > Run on Server.
- A message might display asking you to select a server. Select Choose an existing server and click Finish.
- Alternatively, to directly launch the index.jsp, you can
enter the following URL directly in your Web browser:
http://localhost/webapp/wcs/stores/servlet/Madisons/index.jsp
- At the bottom of the store home page that is displayed, click Help/Contact Us.
- You should see your custom Contact Us page with an input form.
- Leave all the fields blank and click Submit.
You should receive a message that a validation error occurred.
- Type your name in the Name field,
leave the other fields blank, and click Submit. You
should receive a message that a validation error occurred.
- Type your name in the Name field, abc@xyz in the Email address field, and click Submit. You should receive a message that a validation error occurred.
- Type your name in the Name field, abc@xyz.com in the Email address field, This is my comment. in the Comment field, and click Submit. You should see the Contact Us Acknowledgment page display with your name obtained from the input form.