JamesHolmes.com
Struts Console
Home  •  Change Log  •  Download  •  FAQ  •  Help  •  Screen Shots


Help

  1. Installing Struts Console


  2. Upgrading Struts Console


  3. Running Struts Console (Standalone)
    1. Microsoft Windows Platforms
    2. Unix/Linux Platforms

  4. Using Struts Console
    1. Supported Config Files
    2. Turning Off DTD Validation
    3. Configuring Output Options
    4. Tiles Configuration Upgrades

  5. Using Struts Console with Borland JBuilder
    1. Installing Struts Console OpenTool
    2. Turning Off DTD Validation / Configuring Output Options

  6. Using Struts Console with Eclipse and IBM WebSphere Application Developer
    1. Installing Struts Console Plugin
    2. Using Struts Console inside Eclipse/WSAD
    3. Turning Off DTD Validation / Configuring Output Options

  7. Using Struts Console with IntelliJ IDEA
    1. Installing Struts Console Plugin
    2. Using Struts Console inside IDEA
    3. Turning Off DTD Validation / Configuring Output Options

  8. Using Struts Console with NetBeans and Sun One Studio (Forte)
    1. Installing Struts Console Module
    2. Turning Off DTD Validation

  9. Using Struts Console with Oracle JDeveloper
    1. Installing Struts Console Addin
    2. Using Struts Console inside JDeveloper
    3. Turning Off DTD Validation / Configuring Output Options

1.  Installing Struts Console

Installation is quick and easy when following these simple steps.
  1. Download the latest Struts Console release.
  2. Unzip the distribution file to the directory where you want the Struts Console software installed at.

    i.e. "c:\Program Files\" on Microsoft Windows
    i.e. "/home/<username>/" on Unix/Linux

    The distribution contains a parent directory named after the release with all of the directories and files underneath it. For example, the 1.0 release distribution would have a parent directory called "struts-console-1.0".

2.  Upgrading Struts Console

Upgrading from one version of Struts Console to a newer version is pretty straight forward. If you are only using the standalone Struts Console and no IDE plugins then all you have to do is follow the installation instructions for the new version. Each Struts Console realease has a different parent directory, thus allowing for multiple versions to be installed at once.

You may decide to remove the previous version once the new version is installed. Simply delete the parent directory for the previous version from where you installed it and the old version will no longer be installed.

If you are using the Struts Console as a plugin to an IDE then you should only need to repeat the "struts-console.jar" portion of the installation process for that IDE plugin. Please see the installation instructions for the IDE plugin.



3.  Running Struts Console (Standalone)

a.  Microsoft Windows Platforms

There are two ways to run the Struts Console on Windows machines:
  1. Using Windows explorer, navigate to the directory where you unzipped the Struts Console distribution to. Go into the "bin" directory and double click on "console".
  2. Open a DOS command prompt window and navigate to the directory where you unzipped the Struts Console distribution to. Go into the "bin" directory and type "console".
b.  Unix/Linux Platforms

  1. Navigate to the directory where you unzipped the Struts Console distribution to.
  2. If you have not already done so, change "console.sh" file permissions to be exceutable.
  3. Go into the "bin" directory and run "console.sh".

4.  Using Struts Console

The Struts Console is a simple GUI for editing the elements of Struts and Struts-related config files. For information on what each config file element does and what values it accepts, please see the config file DTDs hyperlinked below.

Please see the FAQ page for other topics related to using Struts Console.
a.  Supported Config Files

Below is a list of the config files and their associated DOCTYPEs that Struts Console supports. If your config file does not specify one of these DOCTYPEs then Struts Console will not recognize your config file and thus will not be able to open it.
Struts
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
Tiles
<!DOCTYPE tiles-definitions PUBLIC
          "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
Validator
<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
JSP Tag Library
<!DOCTYPE taglib PUBLIC
          "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
          "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

<!DOCTYPE taglib PUBLIC
          "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
          "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

b.  Turning Off DTD Validation

If your config file uses an altered DTD or simply has no DTD, then the Struts Console will not be able to open your config file. To get around this you can turn off config file validation, thus allowing non-standard files to be opened.

In the standalone version of the software you can turn off this validation by selecting the option for it on the "Options" menu. For instructions on how to turn off validation for IDE plugins, see the specific plugin's section on this page.

c.  Configuring Output Options

The Struts Console reads in Struts config XML files and then manipulates them in memory using the JDOM XML library. Unfortunately, XML parser libraries do not retain all of a file's original formatting when it is parsed. This leads to poorly formatted XML output when the files are saved.

By default, the Struts Console saves/outputs XML files using JDOM's built in XMLOutputter functionality, which results in poorly formatted XML files. To get around this limitation, the standalone version of the Struts Console allows for the configuration of how XML output will be generated. Underneath the "Options" menu in the standalone version you can select "Output". This will bring up a dialog with options for generating "Pretty" output. Following is an explanation of each of the output options.

NOTE: Enabling the "Pretty" output options will remove any comments and formatting from your original config files. The "Pretty" output option simply outputs config files' elements and their attributes.


  1. Enables and disables the use of "Pretty" output options.
  2. Determines the type of newlines to use. System Default is the default and recommended setting. For example, if you are using the Struts Console on a Windows system the System Default will use Windows newlines.
  3. Determines the number of new lines to place in between elements.
  4. Determines the number and type of indenting to use. Indenting is used for elements and is leveled. Each level in the element hierarchy is a level of indenting.
  5. Determines whether an element's attributes should each be placed on a new line or if they should be placed on the same line as the element.
  6. Determines whether or not empty elements, elements without sub elements, should be expanded. For example, if you have an <action> element with no child elements and have selected to expand empty elements it will be outputted as <action></action> instead of just <action/>.
  7. Shows an example of how the output will look with the output options applied. This changes as you change the output options.
d.  Tiles Configuration Upgrades

If you attempt to open a Tiles Config file that is using deprecated settings you will get a warning dialog notifying you that the Struts Console has upgraded the Tiles Configuration. What this means is that the config file you have opened is using settings that have been changed and are no longer the favored approach. The old settings will still work with Tiles, but the Struts Console does not recognize them. Since the Struts Console does not recognize them it goes ahead and upgrades the in-memory copy of the config file to use the newer, preferred settings.

After you dismiss the dialog, you will notice that the config file will be marked as being altered. Typically this is indicated with an asterisk "*" beside the file's name, but may differ depending on how you're using (stanadlone vs. IDE plugin) Struts Console. This just means that the in-memory version of the file has been modified and is different from the saved version.

The following settings will be upgraded:
  • <definition> tags should use "path" attributes and not "page" or "template" attributes
  • <put> tags should use "value" attributes and note "content" attributes
  • <put> tags' "type" attribute should use "page" and not "template" as attribute value
  • <add> tags' "type" attribute should use "page" and not "template" as attribute value

5.  Using Struts Console with Borland JBuilder

The Struts Console software integrates with Borland JBuilder as an OpenTool for seamless development of Struts applications in one development tool. Once the Struts Console OpenTool for JBuilder has been installed, you can manage Struts config files by simply opening them and clicking on the "Struts Console" tab.
a.  Installing Struts Console OpenTool
  1. Shutdown JBuilder if it is currently running.
  2. Navigate to the directory where you have JBuilder installed and then navigate into the "lib" directory.
  3. In another window navigate to the directory where you installed the Struts Console software and then navigate into the "com.jamesholmes.console.struts" directory and then into the "lib" directory.
  4. Copy the "xerces.jar" file from the Struts Console "lib" directory into the JBuilder "lib" directory if and only if "xerces.jar" does not already exist (should only be necessary for JBuilder 4).
  5. Navigate into the "ext" directory from the JBuilder "lib" directory.
  6. Copy the "struts-console.jar" file from the Struts Console "lib" directory into the JBuilder "ext" directory.
  7. Restart JBuilder.
b.  Turning Off DTD Validation / Configuring Output Options
  1. Startup JBuilder if it is not already running.
  2. Go to the "Tools" menu and then select "IDE Options".
  3. Select the "Struts Console" tab.
  4. Set your desired validation / output option preferences.
NOTE: JBuilder will not recognize your Struts config files if they do not have a proper DOCTYPE declaration.

To see an example of how to use this OpenTool go to the Screen Shots Page.

6.  Using Struts Console with Eclipse and IBM WebSphere Application Developer

The Struts Console software integrates with Eclipse/WSAD as a Plugin for seamless development of Struts applications in one development tool. Once the Struts Console Plugin for Eclipse/WSAD has been installed, you can manage Struts config files by simply right clicking on them and selecting "Open With" and then selecting "Struts Console".
a.  Installing Struts Console Plugin

Eclipse 3.0m7 and higher
  1. Shutdown Eclipse if it is currently running.
  2. Navigate to the directory where you have Eclipse installed and then navigate into the "plugins" directory.
  3. In another window navigate to the directory where you installed the Struts Console software.
  4. Copy the "com.jamesholmes.console.struts" directory from the Struts Console installation directory into the Eclipse "plugins" directory.
  5. Navigate into the "com.jamesholmes.console.struts" directory underneath Eclipse "plugins" directory.
  6. Rename "plugin.xml" to "plugin.xml.bak".
  7. Rename "plugin-3.0.xml" to "plugin.xml".
  8. Restart Eclipse.
    1. NOTE: If you are using Eclipse 3 under Linux/Unix, you must run it using JDK 1.5. This is necessary because Faces Console makes uses of a special library (SWT_AWT) for integrating SWT and Swing. The SWT_AWT library requires JDK 1.5 under Linux/Unix.
WSAD and Eclipse 3.0m6 and earlier
  1. Shutdown Eclipse/WSAD if it is currently running.
  2. Navigate to the directory where you have Eclipse/WSAD installed and then navigate into the "plugins" directory.
  3. In another window navigate to the directory where you installed the Struts Console software.
  4. Copy the "com.jamesholmes.console.struts" directory from the Struts Console installation directory into the Eclipse/WSAD "plugins" directory.
  5. Restart Eclipse/WSAD.
b.  Using Struts Console inside Eclipse/WSAD
  1. Startup Eclipse/WSAD if it is not already running.
  2. Find your Struts, Tiles or Validator config file in the Navigator or Packages view on the left hand side of the screen.
  3. Right click on the config file and select "Open With" from the menu and then select "Struts Console".
    1. NOTE: Eclipse/WSAD will not recognize your Struts config files if they are not named "struts-config.xml" (Struts files), "tiles.xml", "tiles-defs.xml", (Tiles files) or "validation.xml" (Validator files). If you would like Eclipse to recognize other filenames as being Struts files you can edit the "filenames" attribute in the "plugin.xml" file in the "com.jamesholmes.console.struts" directory underneath your Eclipse/WSAD "plugins" directory.
  4. To see an example of this, go to the Screen Shots Page.
c.  Turning Off DTD Validation / Configuring Output Options
  1. Startup Eclipse/WSAD if it is not already running.
  2. Go to the "Window" menu and then select "Preferences".
  3. Select the "Struts Console" node in the tree on the left.
  4. Set your desired validation / output option preference.

7.  Using Struts Console with IntelliJ IDEA

The Struts Console software integrates with IntelliJ IDEA as a Plugin for seamless development of Struts applications in one development tool. Once the Struts Console Plugin for IDEA has been installed, you can manage Struts config files by simply right clicking on their nodes in the Project window and then selecting "Struts Console".
a.  Installing Struts Console Plugin
  1. Shutdown IDEA if it is currently running.
  2. Navigate to the directory where you have IDEA installed and then navigate into the "plugins" directory.
  3. In another window navigate to the directory where you installed the Struts Console software and then navigate into the "com.jamesholmes.console.struts" directory and then into the "lib" directory.
  4. Copy the "struts-console.jar" file from the Struts Console "lib" directory into the IDEA "plugins" directory.
  5. Restart IDEA.
b.  Using Struts Console inside IDEA
  1. Startup IDEA if it is not already running.
  2. Find your Struts, Tiles or Validator config file in the Project, Structure or Web pane on the left hand side of the screen.
  3. Right click on the config file and select "Edit with Struts Console" from the menu.
    1. Note that if the "Edit with Struts Console" option does not show up on the file's context menu, then your config file does not have a DOCTYPE definition that Struts Console recognizes.
  4. To see an example of this, go to the Screen Shots Page.
c.  Turning Off DTD Validation / Configuring Output Options
  1. Startup IDEA if it is not already running.
  2. Go to the "Options" menu and then select "IDE Settings".
  3. Select the "Struts Console" button on the left.
  4. Set your desired validation / output option preference.
NOTE: This plugin currently only works with IDEA 3.0 (build 668) or later.

8.  Using Struts Console with NetBeans and Sun One Studio (Forte)

The Struts Console software integrates with NetBeans/SOS for seamless development of Struts applications in one development tool. Once the Struts Console module for NetBeans/SOS has been installed, you can manage Struts config files by simply right clicking on their nodes in the Filesystems explorer and then selecting "Open".
a.  Installing Struts Console Module

NetBeans 3.3 and Sun One Studio 4.0 and higher
  1. Start up NetBeans/SOS.
  2. Go to the "Tools" menu and select "Options".
  3. In the tree on the left hand side, click on "IDE Configuration" then "System" then right click on the "Modules" node and select "Add" then select "Module...".
  4. Use the file chooser to navigate to the directory where you installed the Struts Console software and then navigate into the "com.jamesholmes.console.struts" directory and then into the "lib" directory.
  5. Select the file "struts-console.jar" and then select "Open" in the file chooser.
  6. Restart NetBeans/SOS.
NetBeans 3.2.x and Forte for Java 3.0
  1. Start up NetBeans/FFJ.
  2. Go to the "Tools" menu and select "Options".
  3. In the tree on the left hand side, right click on the "Modules" node and select "New" then select "Module...".
  4. Use the file chooser to navigate to the directory where you installed the Struts Console software and then navigate into the "com.jamesholmes.console.struts" directory and then into the "lib" directory.
  5. Select the file "struts-console.jar" and then select "Open" in the file chooser.
  6. Restart NetBeans/FFJ.
b.  Turning Off DTD Validation

NetBeans 3.3 and Sun One Studio 4.0 and higher
  1. Startup Netbeans/SOS if it is not already running.
  2. Go to the "Tools" menu and then select "Options".
  3. Select the "Uncategorized" node and then the "Struts Console Settings" node in the tree on the left.
  4. Set your desired validation preference.
NetBeans 3.2.x and Forte for Java 3.0
  1. Startup Netbeans/FFJ if it is not already running.
  2. Go to the "Tools" menu and then select "Options".
  3. Select the "Struts Console Settings" node in the tree on the left.
  4. Set your desired validation preference.
NOTE: NetBeans/SOS will not recognize your Struts config files if they do not have a proper DOCTYPE declaration.

To see an example of how to use this Module go to the Screen Shots Page.

9.  Using Struts Console with Oracle JDeveloper

The Struts Console software integrates with Oracle JDeveloper as an Addin for seamless development of Struts applications in one development tool. Once the Struts Console Addin for JDeveloper has been installed, you can manage Struts config files by simply opening them with the "Struts Console Editor" from the System Navigator.
a.  Installing Struts Console Addin
  1. Shutdown JDeveloper if it is currently running.
  2. Navigate to the directory where you have JDeveloper installed and then navigate into the "jdev" directory.
  3. Next, navigate into the "lib" directory and then into the "ext" directory.
  4. In another window navigate to the directory where you installed the Struts Console software and then navigate into the "com.jamesholmes.console.struts" directory and then into the "lib" directory.
  5. Copy the "struts-console.jar" file from the Struts Console "lib" directory into the JDeveloper "ext" directory.
  6. Restart JDeveloper.
b.  Using Struts Console inside JDeveloper
  1. Startup JDeveloper if it is not already running.
  2. Find your Struts, Tiles or Validator config file in the System Navigator pane on the left hand side of the screen.
  3. Right click on the config file and select "Struts Console Editor" from the menu.
    1. Note that if the "Struts Console Editor" option does not show up on the file's context menu, then your config file does not have a DOCTYPE definition that Struts Console recognizes.
  4. To see an example of this, go to the Screen Shots Page.
c.  Turning Off DTD Validation / Configuring Output Options
  1. Startup JDeveloper if it is not already running.
  2. Go to the "Tools" menu and then select "Preferences".
  3. Select the "Struts Console" node in the tree on the left.
  4. Set your desired validation / output option preference.


JamesHolmes.com  |  james@jamesholmes.com