Open in new window

back

Graphical Editor for Struts Configuration Files

The Struts configuration file editor has three main viewers (modes): Diagram (shown), Tree and Source. The modes can be selected via the tabs at the bottom of the editor. Any changes made in one mode are immediately visible when you switch to any other mode.

When working in Source view, you always have all the following features available:

  • Content Assist
  • Open On Selection
  • File Folding

Diagram Mode

The Diagram mode graphically displays the Web flow of the application defined in the Struts configuration file.

strutsConfig.gif

Just by right-clicking anywhere on the diagram, you can use a context menu to create the building blocks of a Struts application:

  • Actions
  • Global forwards
  • Global exceptions
  • JSP Pages

strutsConfigDiagramEdit.gif

Along the upper-left side of the editor is a stack of seven icons for changing the behavior of the cursor in the diagram. The first icon switches to the default regular selection cursor, the second to the marquee selection cursor, and the third to the new connection cursor. The last four icons switch the cursor to an insert cursor for each type of Struts build block listed above (and in the order listed).

For instance, clicking on the first of these four icons (the one with the gears) will switch the cursor to insert actions. Clicking anywhere in the diagram with this cursor has the same effect as right-click and selecting Add/Action... from the context menu with the regular cursor active. It's just more efficient to use this cursor if you're adding more than one action at once.

strutsConfigDiagramToolbar.gif

Tree Mode

In the Tree mode, the different elements of the Struts application are organized into functional categories on the left-hand side and a form for editing the properties of currently selected items on the right-hand side.

strutsConfigTree.gif

You can also right-click on any node in the category tree and perform appropriate operations through a context menu. For instance, by right-clicking on the action-mappings category node, you can add new actions to the application.

strutsConfigEdit.gif

Source Mode

In the Source mode, you have complete editing control of the underlying XML coding.

strutsConfigSource.gif

You can take advantage of code assist.

strutsConfigSourcePrompting.gif

The editor will also immediately flag any errors.

strutsConfigSourceErrors.gif

Finally, you can use the Outline view with the editor to easily navigate through the file.

strutsConfigSourceOutline.gif

back