The Struts Console Tool

When you’re developing a small application, the Struts configuration is manageable. It’s still XML, but typically it’s not much of a problem. Some developers use XML editors, while others use ordinary text editors. Both of these are fine when the application is relatively small, but when you are working on a large Struts project, the size and complexity of the file can be staggering.

The Struts Console application was created by James Holmes to solve this and other problems associated with managing large configuration files. It is a Swing-based application that provides an easy-to-use interface for editing the various elements of the Struts configuration file.

You can download the Struts Console for free from http://www.jamesholmes.com/ struts/console, even though it’s not open source software. No license currently is necessary, but you should check the web site to make sure this hasn’t changed.

Tip

The formatting of your Struts configuration file might be modified when you save the file using the Console. The Console uses an XML parser to read in the configuration file, and the parser can’t maintain complete knowledge of how the file was originally formatted. The Console does provide several output options that you can use to format the XML file based on different formats.

Figure 4-5 shows the action screen from the Struts Console.

The action configuration screen from the Struts Console

Figure 4-5. The action configuration screen from the Struts Console

The Struts Console application also plugs into multiple popular Java integrated development environments (IDEs). Currently, the supported IDEs include:

  • JBuilder (4.0 or higher)

  • Eclipse (1.0 or higher)

  • NetBeans (3.2 or higher)

  • Oracle JDeveloper (9i or higher)

  • Sun One Studio (3.0 or higher)

Figure 4-6 shows what the Console application looks like in JBuilder.

The Struts Console running in the JBuilder IDE

Figure 4-6. The Struts Console running in the JBuilder IDE

Get Programming Jakarta Struts, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.