Before you begin, you must complete Exercise 8.1: Creating the flow control page.
Now you need to change the Web interaction to use the new error page.
To modify the Web interaction:
The Web Interaction wizard opens.
The name and location of your Web interaction are already specified.
The Output JSP window opens.
You will re-use the Feedback parameter to control which page the Web Interaction will send next after it performs its action; the result.jsp or the RecordNotFound.jsp. So you don't have to add another parameter or change the parameters, you just change the values the feedback parameter returns depending on whether a customer record was found or not found.
This opens the Input Parameters page.
This opens the Output Parameters page.
Now a Flow controller property is added to the Properties
table.
The Flow Control Specification dialog opens.
This creates a new flow condition. The default page is result.jsp.
This will set the flow control such that if the value of Feedback is 0, then the program will output the customer information to the result.jsp page and display it.
However, if the customer number doesn't exist in the database, the Feedback value will be something else other than 0, and instead of displaying a message near the input field, it will show the user the RecordNotFound.jsp page for a more helpful response.
You have changed the Web interaction to use the new error page and now you are ready to begin Exercise 8.3: Testing the new error page.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.