Use this lesson to learn how to add input fields, push
buttons, and output fields to JSP pages to create dynamic user interfaces
for input and output.
In the input fields, the user of the resulting application
will type the day, month, and year of interest. The input page includes
Submit and Refresh buttons. In the output field, the corresponding
day of the week will be displayed. To create these pages:
- Add
elements to the input JSP page.
- Add
elements to the output JSP page.
Output page
To add fields to the output JSP page:
- In your Web diagram, double-click the output.jsp page to
open the page in the editor.
- In the editor, click the Design tab.
- In the Page Data view, expand the Struts Form
Beans folder. Drag dateData from
the Page Data view onto the input JSP page in the editor. The Insert Data Object dialog opens.
- Clear year, month,
and day
- Select Displaying an existing record and
click Finish to create the fields in the page.
- Save and close the output JSP file.