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

< Previous | Next >


Update the controller command configuration

In this step, we will update the MyContactUsCmd configuration to work with the Validator framework.


Procedure

  1. The struts-config-ext.xml file should still be open for editing in the Struts Configuration File editor.

  2. Click the Action Mappings tab. In the Action Mappings section, select MyContactUsCmd. This is the action you have specified in the Struts input form of MyContactUsDisplay.jsp.

  3. In the Form Bean Specification section, in the Input field, type /ConsumerDirect_name/StoreInfoArea/MyContactUsDisplay.jsp, where ConsumerDirect_name is the name of the store. This is the view to which the user will be forwarded if validation fails. In this case, we will be forwarding the user back to the MyContactUsDisplay.jsp page to give them the opportunity to correct and resubmit their form data.

  4. Ensure the Validate check box is selected. This will ensure the Struts validation can take place as part of the action execution.

  5. Save the changes.

< Previous | Next >


+

Search Tips   |   Advanced Search