Tutorials > Program model > Use Struts tags, action forms, and validation

< Previous | Next >


Test the validation functionality

This section explains the testing of the validation functionality.


Procedure

  1. Start the test environment.

  2. Navigate to the Stores > WebContent > ConsumerDirect_name directory.

  3. Right-click the index.jsp file and select Run > Run on Server.

  4. A message might display asking you to select a server. Select Choose an existing server and click Finish.

  5. Alternatively, to directly launch the index.jsp, you can enter the following URL directly in the Web browser:

    http://localhost/webapp/wcs/stores/servlet/ConsumerDirect/index.jsp 
    

  6. On the store locale selection page that is displayed in the Web browser, click United States English.

  7. At the bottom of the store United States English home page that is displayed, click Contact Us.

  8. You should see the custom Contact Us page with an input form.

  9. Leave all the fields blank and click Submit. You should see the following:

  10. Type the name in the Name field, leave the other fields blank, and click Submit. You should see the following:

  11. Type the name in the Name field, abc@xyz in the Email address field, and click Submit. You should see the following:

  12. Type the 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 finally see the Contact Us Acknowledgment page display with your name obtained from the input form.

< Previous | Next >


+

Search Tips   |   Advanced Search