1.0 Introduction
2.0 Supported software and specifications
3.0 Changes from the previous release
4.0 Known problems and limitations
4.1 General
4.2 Wizards
4.3 Editors
4.4 Converting Struts 1.0 project to Struts 1.1
4.5 Struts level of support
Struts is a set of Java classes and JSP tag libraries that supports a framework for developing Web applications. Struts is open source and was developed as part of the Apache Software Foundation's Jakarta project. Struts helps you develop applications that are divided into three functional areas: model (business logic), view (JSPs and Java beans), and controller (Struts actions and configuration).
Note: The Struts tools include Jakarta Struts versions 1.0.2 and 1.1 Beta 3, which are distributed under the terms of the Apache Software License, Version 1.1 (see http://www.apache.org/LICENSE). This license defines the terms under which you may use Struts (and other software licensed by Apache). For more information on the Apache Software Foundation, see http://www.apache.org/.
Jakarta Struts
The Struts tools primarily support Struts 1.0.2. Some support for Struts 1.1 beta 3 is also included. See the information above under Struts 1.1 beta 3 for more details about what is supported. Other versions of Struts, including any modifications by you or other third parties, are not supported by the Struts tools.
- Upgraded the version of Struts included to 1.1 beta 3. Struts 1.0.2 is still also included.
- Performance improvements:
- For large workspaces that contain a lot of Java code and at least one Struts project, the amount of time it takes to do a build has been dramatically improved. For example, some situations that used to take hours to build now complete in seconds.
- The time it takes to load the workspace and J2EE perspective has been significantly reduced.
- The time it takes to open the Web diagram editor has been greatly reduced.
- The source code for the Struts run-time classes is not included. So, for example, source code is unavailable when stepping through the Struts run-time code itself in the debugger. This does not affect the visibility of any other source code (your own, for example). To make the Struts run-time source code available you have to download the source distribution of the corresponding version of Struts from the Struts web site and manually attach it to the Struts run-time jar file(s) in your project.
- Regarding the validation of Struts configuration files: The workbench validation preferences settings may affect whether or not all XML syntax errors are detected. To ensure that all errors are detected and reported, you may need to increase the maximum number of validation messages on a project above the default value of 25.
- The Action Class Wizard, ActionForm Wizard, and Action Mapping Wizard all generate a default constructor, even if all method-stub checkboxes are unchecked.
- The ActionForm Wizard does not check whether the names of the fields you add are valid JavaBean field names (Java identifiers) or not. So, if you give a field an invalid name, you get Java compilation errors after the wizard creates the ActionForm subclass.
- In the Action Class Wizard, Action Mapping Wizard, and ActionForm Wizard, you can remove only a single item at a time from the tables therein. If you select multiple items (rows) and click on the Remove button, only the first selected item is removed.
- The Action Mapping Wizard incorrectly lets you create a new action mapping that contains duplicate forward names. However, validation of the Struts configuration file correctly flags this as a problem.
- The Web diagram editor and Struts configuration file editor behave unpredictably if they are editing a file when the project in which the file resides is renamed. Before you rename a project, make sure that you are not using either of these editors to edit any files within that project.
- In the Web diagram editor, a line between an action node and a bean or a form bean that is not the action's input form bean is never realized. This is because the line represents the intention that the action implementation (Action subclass) references the bean, which our tools cannot currently detect.
- The Web diagram editor, does not correctly handle forward connections named "
"input"
" (where quotation marks are included in the name of the forward). Forward connections named "input" (where quotation marks are not included in the name of the forward) are handled correctly.- The Design view of the Page Designer does not render custom tags (including Struts tags) that are outside the
<body>
element.- If you create an entry in either the
Action
or theForm Bean
page of the Struts configuration file editor, add mapping information to the editor's page, and then attempt to create an implementing class by pressing the "Edit...
" button, the information you have entered is not displayed in the mappings page of the wizard, even if you check theAdd new mapping
box. However, in this use case, the mapping is generated by the editor, not by the wizard.
To convert a Struts 1.0 project to Struts 1.1, complete the following steps:
- Create a new Struts 1.1 project and copy the Java source and Web pages to the new project.
- In the Source view of the Struts configuration file editor, copy the action-mappings, form-beans, and global-forwards tags to the new configuration file, overwriting the existing tags.
The project should then be ready to run.
This section describes enhancements to the Struts tools that are not in the main Struts tools documentation.
Support for Struts 1.1 Beta 3
The Struts tools primarily support Struts 1.0.2. However, they also include some limited support for Struts 1.1 beta 3. We plan to enhance and complete Struts tools support for Struts 1.1 in the future. When the Struts 1.1 final is released, we plan to enhance the Struts tools to support it and to drop support for Struts 1.1 beta 3. For the remainder of this document, references to Struts 1.1 refer to Struts 1.1 beta 3 unless otherwise noted. Currently, Struts tools support for Struts 1.1 is limited to the following items:
- General - In general, the Struts tools work correctly on artifacts that exploit Struts 1.1 features not yet specifically supported. For example, the Struts configuration file editor does not yet have specific support for exploiting DynaActionForms (
form-bean
entries defined withform-property
elements). Nevertheless, the editor does work correctly on Struts configuration files that do use them. However, you must configure them by editing the XML source page directly.- Validation - Struts 1.1 applications are fully validated (that is, to the same extent as Struts 1.0.2 applications).
- Wizards
- The Web Project Wizard Struts Feature lets you to create a Struts 1.1 application and correctly configures your project for Struts 1.1 application development. Note that currently this adds Struts 1.1 beta 3 run-time support files to your project. When Struts 1.1 final is officially released, you will need to manually update your applications with the Struts 1.1 final run-time support files (if desired).
- In general, the Struts tools wizards produce version-appropriate artifacts. For example, in a Struts 1.1 application the Action Mapping Wizard creates a new Action subclass that contains an "
execute
" method rather than a "perform
" method, which is deprecated in Struts 1.1.- Module Support
- A Module Wizard has been added for creating a new Struts module in a Struts 1.1 application.
- A Web diagram is associated with a particular module. This may be the "default" module (which is the only possibility in a Struts 1.0.2 application). In a Struts 1.1 application, the Web diagram editor lets you add and connect to or from module nodes.
- The Web Structure View displays modules as children of the project in which they are defined. The actions and forward from the module are assumed to execute in that module's context. The context for forwards and links in the Web pages from the "Web Pages" category are also assumed to execute in the module's context. As you expand nodes, note that the module context of the child (target) may be different from the parent (source) for nodes like links to actions, forwards, etc.
- Page Designer - Page Designer in most cases correctly renders Struts 1.1 tags on the design page. The following limitations currently apply:
- The
struts-tiles
tags are not rendered.- The
html:frame
tag is not rendered.- The format attribute
bean:write
tag is not enabled for rendering.- The Data Mapping View does not deal with
nested
tag properties correctly.Web diagram editor
Capability has been added to the Web diagram editor for when new Web page nodes are dropped onto its drawing surface. If a diagram in a Struts 1.1 Web project is associated with a nondefault Struts module and you drop a new Web page node and name it without a leading slash ("/"), the editor automatically prepends the module name to the Web page name. For example, if you drop a JSP onto a diagram associated with a Struts module called "module1" and named it "logon.jsp", the editor renames the JSP node as "/module1/logon.jsp". If you name the Web page node with a preceding "/" the editor leaves the name as entered. For example a JSP named "/logon.jsp" is not renamed.
Return to the main readme file