Realizing nodes
When you add a node to a Web diagram, its underlying resource (for example, a Web page) is normally created automatically. In other words, you realize a node by default when you create it. Alternatively, you can add a node to a diagram without creating its underlying resource. In this case the node remains unrealized until you create the associated resource.
- Create a Web project. You can create either a dynamic Web project or a static Web project.
- Create a dynamic Web project if your Web application contains dynamic J2EE resources such as servlets, JSP files, filters, and associated metadata. A dynamic Web application can contain multiple Web diagrams.
- Create a static Web project if your Web application does not contain any server side scripting. A static Web project contains resources that do not change at runtime on the Web server, for example HTML and CSS files.
When you create a Web project, a Web Diagram,
WebDiagram.gph, is automatically created and opened in the editor. You can begin to define the flow of your Web application.
- Create a Web diagram.
- Add a node.
In a Web diagram, realized and unrealized nodes are shown differently. Realized nodes have color and black title text. Unrealized nodes are gray and have gray title text.
Figure 1 shows a Web diagram for a simple application that has three Web pages. The welcome.jsp and registration.jsp pages are realized. The error.jsp page is unrealized.
Figure 1. A simple Web diagram with two realized nodes and one unrealized node.
Nodes become unrealized if the underlying resource is renamed or moved in the file system or in the Enterprise Explorer view. To realize a node where the underlying resource already exists, rename the node in the Web diagram.
To realize a node by creating a resource manually, double-click the unrealized node in the Web diagram. The resource is automatically created. Alternatively you can realize the node by right-clicking the unrealized node in the Web diagram and selecting
Create. The resource is automatically created.