Exercise 5.2: Adding the flow control error page

Before you begin, you must complete Exercise 5.1: Generating another output page using the Web Interaction wizard.

Now that the update complete page (custDoUpdateResults.jsp) is created, you can add the condition to this Web interaction to indicate which page to show next. If the update was successful, the update complete page is shown, otherwise the error page is shown. In order to add this feature you need to change the Web interaction you just created.

  1. Drill down through your project and find the Web interaction file named custDoUpdate.wit.
    Drill down to custDoUpdate.wit
  2. Double-click the Web interaction file.

    The Web Interaction wizard opens.

  3. Click Next.

    Next you add the error page to the possible output pages to be displayed. Now you can define when to display one or the other.

  4. Click Add.
    Adding flow controlled error page
  5. Select UpdateError.jsp on the Output page dialog. Click OK.
  6. Click Next until you reach the Map and Link the Output Parameters to the Output Fields page.
    Output Parameter Definition
  7. Under Output parameters, select the forward parameter.
  8. Select the value true for the Flow Controller list.
    Enabling Flow Controller
  9. In the Flow Control Specification dialog, select UpdateError.jsp in the Output JSP field.
    Specifying flow control
  10. Click New .
  11. Type OK in the Value field and select custDoUpdateResults.jsp as the Output jsp
  12. Click OK.

    You return to the Web Interaction wizard.

  13. Click Finish.

You have added a flow control error page and now you are ready to begin Exercise 5.3: Linking the update complete page to the inquiry page.