Lesson 1.5: Creating two JSP files
Before you begin, you must complete
Lesson 1.4: Creating an action and an action mapping.
In this Lesson, you will create two Web page files, one for input and one for output.
These files will be named index.jsp and output.jsp to match the nodes you created in the Web diagram.
Creating the index.jsp file
- In the Web diagram, double-click the index.jsp node. The New JSP File wizard opens.
- In the Model field, select Struts JSP.
- Select the Configure advanced options check box.
- Click Next.
- On the following pages, click Next:
- Tag Libraries
- JSP File
- JSP File
- On the Form Field Selection page in the Form bean
entry menu, click dateData.
- Select the year, month, and day check boxes.
- Select the Generate fields in a form check box.
- Click Finish. The index.jsp file opens in the editor. It should look like this picture:

- Close the index.jsp file.
Creating the output.jsp file
- In the Web diagram, double-click the output.jsp node. The New JSP File wizard opens again.
- In the Model field, select Struts JSP.
- Select the Configure advanced options check box.
- Click Next.
- On the following pages, click Next:
- Tag Libraries
- JSP File
- JSP File
- On the Form Field Selection page in the Form bean
entry menu, click dateData.
- Select the dayOfWeek check box.
- Clear the Generate fields in a form check box.
- Click Finish. The output.jsp file opens in the editor. It should look like this picture:

- Close the output.jsp file.
All nodes of your Web diagram should now be realized, and the diagram should look like this:

Now you are ready to begin Lesson 1.6: Testing your Struts application.