Using Struts Console Inside IBM Rational Application Developer for WebSphere

Using Struts Console Inside Eclipse

Struts Console can be run as a plugin inside Eclipse versions 1.0 and later. To do so, you first have to install the Struts Console Eclipse plugin. Following is the list of steps for installing the Struts Console Eclipse plugin:

  1. Shut down Eclipse if it is currently running.

  2. Navigate to the directory in which you have Eclipse installed (e.g., c:\Program Files\eclipse) and then navigate into the plugins directory.

  3. In another window, navigate to the directory in which you installed Struts Console (e.g., c:\java\struts-console-5.0).

  4. Copy the com.jamesholmes.console.struts directory from the Struts Console installation directory into the Eclipse plugins directory.

  5. If and only if you are running Eclipse versions 3.0m6 or earlier, rename the plugin.xml file beneath the Eclipse plugins directory to plugin.xml.bak. Next, rename pluginold.xml to plugin.xml. This step is necessary because there are two Struts Console Eclipse plugins, one for Eclipse versions 3.0m7 and later and one for earlier versions of Eclipse.

After you have installed the Struts Console Eclipse plugin, you must restart Eclipse.

Once Eclipse is running, to use Struts Console, simply right-click a valid configuration file and select Open With | Struts Console, as shown here:

image from book

For Eclipse versions 3.0m7 and later, after you have opened the file, it will load into the Struts Console editor inside of Eclipse, as shown in Figure A-3. You can edit the configuration file using Struts Console, or you can edit the file by hand from the Source tab. Changes made in either tab are automatically reflected in the other tab. For versions of Eclipse prior to 3.0m7, the file will load into a separate Struts Console window, as shown in Figure A-4.

image from book
Figure A-3: Struts Console editor inside Eclipse

image from book
Figure A-4: Struts Console editor in a separate window


The Struts Console Eclipse plugin requires that your configuration files have specific filenames in order for the plugin to recognize them. Struts configuration files must be named struts-config.xml; Tiles configuration files must be named tiles.xml; and Validator configuration files must be named validation.xml. JSP TLD files only need to have a file extension of .tld.

Struts Console also allows you to modify some of its configuration settings from inside Eclipse. To access the Struts Console configuration settings, select Window | Preferences. The following illustration shows the Struts Console Preferences dialog box.

image from book

For more information on these configuration settings, see the section "Configuring the Struts Console Output Options" later in this appendix.

Struts. The Complete Reference
Struts: The Complete Reference, 2nd Edition
ISBN: 0072263865
EAN: 2147483647
Year: 2004
Pages: 165
Authors: James Holmes

Similar book on Amazon
Struts 2 in Action
Struts 2 in Action
Murach's Java Servlets and JSP, 2nd Edition
Murach's Java Servlets and JSP, 2nd Edition
Jakarta Struts For Dummies
Jakarta Struts For Dummies
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam © 2008-2017.
If you may any questions please contact us: