Running H/F 1 421
5. Click the Local Forwards tab. Ensure that /deposit is selected.
Click Add in the Local Forwards section, name the new forward success, and
populate the Path field in the Forward Attributes section with /result.jsp.
Click Add again to add the forward failure with the /deposit.jsp in the Path
field.
6. Save and close the struts-btt-withdrawal.xml file.
To realize the deposit.jsp, perform the following tasks:
1. Double-click the deposit.jsp in the Web diagram.
2. When the New JSP file wizard opens, the wizard provides the default values,
which should be accepted. Ensure that Struts JSP is selected in the Model
field, and that Configure advanced options is checked. Click Next.
3. In the tag libraries page, choose Struts html and Branch Transformation
Toolkit’s /WEB-INF/btt-html.tld tag libraries. Click Next.
4. In the next page, click Next to accept the default, or deselect Use workbench
encoding to use UTF-8, and then click Next.
5. Click Next when the JSP File Choose Method Stubs to generate dialog box
opens.
6. In the Form Field Selection page, the withdrawalForm is selected by default.
To specify which fields to use, check the accountNumber, and amount
fields. Both accountNumber and amount will be the input fields. Click Next.
7. In the next dialog box, design the input form used in the deposit.jsp page. For
the accountNumber field, input the following parameters:
–ID: AccountNumber
– Label: AccountNumber
For the amount field, input the following parameters, and click Finish:
–ID: Amount
– Label: Amount
To complete the Web diagram, perform the following steps:
For /prepareDeposit action, do the following:
1. Close the withdrawal.gph Web diagram and reopen it.
2. Right-click the /prepareDeposit action. Select Draw → Draw Selected From
from the context menu.
3. Select Forward → /deposit.jsp check box and click OK.