< Previous | Next >

Lesson 2: Create Web diagram nodes

Use this lesson to learn how to add nodes to the Web diagram of your new project.
A Web diagram helps you visualize and change the flow of a Web application. Before using the Web diagram editor, you should understand the following terms:

To create nodes on your Web diagram to represent two Web pages and a Struts action:

  1. Open the Web Parts drawer of the palette. Drag a Web page node onto your diagram. The diagram shows a new Web page node with the default name page.jsp.
    The first Web page node is shown with the name 'page.jsp'.
    Tip: When you create a new node in a Web diagram, the name of the node is automatically selected for editing. If you click elsewhere in the diagram before typing a new name, the new Web page name stays the same. To rename a node, click the name to highlight it, and then type a new name.
  2. Type input.jsp as the new name of the Web page node.
    The first Web page node is shown with the name 'input.jsp'.
    Note: As soon as you name the Web page node, the JavaServer Pages (JSP) file that this node represents is created in your DayOfWeek\WebContent Web project folder.
  3. Drag another Web page node into the diagram.
  4. Type output.jsp as the name of the second Web page.
    The second Web page node is shown with the name 'output.jsp'.
  5. Drag a Struts action into the diagram to create a node called action1.
    The action node is shown with the name 'action1'.
  6. Type computeDay as the name of the action and press Enter. The Web diagram displays an action node named /computeDay. The action is created in DayOfWeek\Struts\<default module>\Actions.
    The action node is shown with the name '/computeDay'.
  7. Save your Web diagram.
Your Web project should include the following items: /computeDay, input.jsp, and output.jsp.
The Enterprise Explorer highlights the /computeDay, input.jsp, and output.jsp files. The Web diagram editor shows the same files in graphical form.

Lesson checkpoint

In this lesson, you added an input JSP file, an output JSP file, and the /computeDay action.
You learned to do these tasks:
  • Add JSP files and a Struts action to your Web diagram.
  • Locate your JSP files and Struts action in the Enterprise Explorer.
< Previous | Next >

Feedback