Previous Next vertical dots separating previous/next from contents/index/pdf

Opening the Struts Configuration

In this section, you will open the Struts configuration used by the Workshop tour project. You will use the Struts Outline View and the Struts Configuration Editor to view and modify the Struts configuration.

Background

Workshop for Struts and Workshop Studio provide Struts configuration file Source and Design editors. In addition, a Struts configuration file Compound editor combines the benefits of both editors? capabilities. Changes in the Design editor automatically updates the Source editor and vice versa. The Compound editor also synchronizes the selection between the Design and Source editors. Of course, all of the other benefits of the environment, including the Smart Editors, the Tag Libraries view and the Property Sheet are also extended for use with the Struts Configuration editor as well.

Activating the Struts configuration file editor

  1. In the Package Explorer, expand the WEB-INF folder.
  2. Double-click on struts-config.xml to open this configuration file for editing.
  3. By default the Compound editor is activated. (Notice that the Struts Config tab is selected.)

  4. Click on the Source tab to activate the Source editor.
  5. Click on the Navigation tab to activate the Navigation editor.
  6. Click on the Struts Config tab to activate the Struts Config form editor.
  7. Notice that the Struts configuration navigation editor shows the flow related to the first action declared in the configuration file.

Using the Struts outline view

  1. In the Outline view, expand Form Beans to show the list of the Struts form beans defined in this configuration file.
  2. Select logonForm. Notice that the logonForm properties are loaded in the Struts Config view.
  3. Double-click on Action Mappings to view all the actions defined in this configuration file.
  4. Double-click on the /checkoutShipping action and the Navigation view should focus on the /checkoutShipping action.

Using the Compound editor

  1. Click on the Struts Config tab at the bottom of the Struts editor.
  2. In the Struts Config view, expand the Action Mappings node and select the payment forward underneath the /checkoutShipping action in the graph, as shown below.

  3. Note that the source code now shows where this is defined.

  4. In the Struts Config view, select the payment forward, change the Name to payments in the Forward Properties, and press Enter
  5. Note that the forward name changes to payments in the Navigation and Source views.

  6. In the Source view, change the forward name payments back to payment.
    Note that the forward name changes into payment in the Navigation view as well.

 

Related tasks

Working with Struts applications

Related reference

Struts Configuration Editor

Click one of the following arrows to navigate through the tutorial:

 

Skip navigation bar   Back to Top