< Previous | Next >

 

Lesson 2: Create Web diagram nodes

 

+

Search Tips   |   Advanced Search

 

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. In Enterprise Explorer, expand your Web project and double-click Web Diagram to open your Web diagram in the editor.

    Tip: Select the Welcome to the Web Diagram Editor object on the Web diagram, and then press the Delete key to remove the object.

  2. Open the Web Parts drawer of the Palette

    Window | Show View | Palette

    Drag a Web page node onto your diagram. The diagram shows a new Web page node with the default 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 node becomes realized and the new Web page name stays the same. When you realize a node, the underlying resource is created. To rename a realized node, right-click the node and select

  3. Type input.jsp as the new name of the Web page node.

    Note: As soon as you name the Web page node, the JSP file that this node represents is created in your DayOfWeek\WebContent Web project folder.

  4. Drag another Web page node into the diagram.

  5. Type output.jsp as the name of the second Web page.

  6. Drag a Struts action into the diagram to create a node called action1.

  7. 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.

  8. Save your Web diagram.

Your Web project should include the following items: /computeDay, input.jsp, and output.jsp.

 

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:

< Previous | Next >