Understand the available Struts development tools

Creating data access Web applications using Struts

A Struts-based Web application, also known as a Struts application, is a Web application that uses the Struts framework.

Using Struts to create a complex Web application can help make the application more maintainable. The application is easier to debug, easier to extend, and easier to understand. Using Struts tools can improve the efficiency by which you create the Struts-based application. The Struts tools work with the Web diagram editor.

Struts applications use the Struts framework to implement a model-view-controller design approach to building Web applications. As part of the controller portion of MVC, each Struts application has an action servlet configured in the application's deployment descriptor (web.xml) file. For a Web application to be a Struts application, the action servlet must be configured and the appropriate resources must be in the Web project. Some of these resources, which are created automatically when you create a Struts-enabled Web project with this product, are as follows:

Struts tools for application development

The Struts feature provides tools that help you use Struts to develop Web applications more effectively.

The Struts framework helps you create Web applications that are more maintainable. The Struts tools in this product help you create Struts-based Web applications more efficiently.

Benefits of Struts tools

The Struts feature provides the following benefits:

Struts editors

The Struts tools in the Struts feature provide the following editors:

Editors enhanced for Struts

In addition, the following editors have been enhanced:

Struts configuration files

A Struts configuration file is an XML document that describes all or part of a Struts application. A Struts configuration file contains information about many types of Struts resources and configures their interaction.

A Struts configuration file contains the following categories of information:

To take effect, a Struts configuration file must be referenced from the Web deployment descriptor (web.xml file) for the configured Struts action servlet.

The Struts configuration file editor in the workbench is designed specifically to edit Struts configuration files. The XML editor has been enhanced to use the configuration file DTD.

Struts configuration file editor

If you create just one Struts configuration file, its default name is struts-config.xml.

Editing Struts resources from the Web diagram editor

In the Web diagram editor you can open editors on the underlying resources represented by the nodes on the free-form surface.

Realizing nodes in Web diagrams

When a node in a Web diagram is realized, the underlying resource represented by the node comes into existence.

To realize an unrealized node, either double-click the node (to invoke the appropriate wizard) or change its path to refer to an existing resource.

The following list describes the action that results from double-clicking:

You can also realize an unrealized part by modifying its properties to identify it as an existing part. For example, an action mapping part can be made realized by changing its path to be the path of an existing action mapping. Changing the path of an action mapping or Web page part can be done by either selecting the part and changing the attribute on the properties page, or by double-clicking on the node's label, or by bringing up the pop-up menu of the part (right mouse clicking over the part) and selecting the Rename action. An unrealized connection that represents an action mapping forward can be realized in a way similar to the way described above. The difference being that the pop-up menu option is Edit the forward name.

Defining application flows with the Web diagram editor

To define the flow of your dynamic Web application, you can use the Web diagram editor, a visual editor for editing Web diagrams.

To define an application flow:

  1. Create a Web diagram.

  2. Edit the Web diagram.

  3. Optionally, at any time set preferences for Web diagrams.

Professional hosting     Belorussian informational portal         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     Free SCWCD 1.4 Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide