6.1 Release Notes - Version 1.2.7


This section contains release notes for changes that have taken place since Version 1.2.4 . To keep up-to-date on all changes to Struts, subscribe to the dev@ list.

Notes on upgrading are maintained in the Wiki Upgrade pages . The wiki is a community maintained resource - please feel free to add your input so that everyone can benefit from the collective experience.

For the version requirements of each library, see the Installation chapter .

Highlights of Changes

The purpose of this section is to highlight the new features since the Version 1.2.4 release. For detailed information concerning changes see the Detailed Changes section.


Struts has changed its dependencies on the following software components:

  • Commons BeanUtils dependency changed to Version 1.7.0
  • Commons Digester dependency changed to Version 1.6
  • Commons Validator dependency changed to Version 1.1.4
  • Dependency on Commons Collections has been removed
  • Dependency on Commons Lang has been removed

Core Struts

Saving Messages in the Session

A new method to store errors in the Session [ saveErrors(HttpSession, ActionMessages) ] has been added to Action along with the automatic removal of these errors once they have been accessed. This is equivalent to the facility for messages that was included in the Version 1.2.4 release.

Re-directing ActionForward

ActionRedirect is a subclass of ActionForward which is designed for use in redirecting requests, with support for adding parameters at runtime. See the javadoc for more details.

Download Action

DownloadAction is an abstract action that provides the nuts and bolts for downloading files. See the javadocs and Wiki for further information.

Dispatch Helper

ActionDispatcher is a helper class for providing DispatchAction type behaviour without having to inherit from DispatchAction . See the javadoc for more details.

Lazy Validator Form

A DynaBean flavour ActionForm which doesn't need its properties to be defined and provides Lazy List and Lazy Map behaviours.

Config Files in jars

Config files (i.e. Struts config, Validator config and Tiles config files) can now be stored in jars. Struts checks the servlet context, as before but if not found Struts now tries the classloader to try and get them.

Tag Library Changes

Highlighting Errors

Struts can now automatically highlight error fields using the new errorKey , errorStyle , errorStyleClass and errorStyleId attributes on the HTML Input Tags. See the User Guide for details of these attributes.

Readonly / Disabled Forms

It is now possible to either disable or make read only all fields for a form using the new readonly and disabled attributes on the <html:form> tag. N.B. The readonly attribute only affects <html:text>, <html:textarea> and <html:password> as per the HTML 4 specification. See the User Guide for details of these attributes.

HTML Tag Refactoring

Many of the HTML tags have been refactored to make them easier to extend.

  • A prepareOtherAttributes() method was added - called just before the closing tag element, it provides a place to render additional attributes.
  • The name attribute rendering is now in a prepareName() method to make it easier to provide custom behaviour.
  • The value attribute rendering is now in a prepareValue() method to make it easier to provide custom behaviour.
  • When rendering an attribute, these tags now use the getter for the property rather than the actual property - that means that if you wanted, for example to override the TextTag's styleClass then one option is to override the getStyleClass() method.
  • Rendering of attributes now uses a simple prepareAttribute() method to generate the name="attribute" format, making most attribute rendering a one line statement.

Bundle Attribute

The bundle attribute has been added to the following HTML tags: ButtonTag, CancelTag, CheckboxTag, FileTag, FrameTag, HiddenTag, LinkTag, MultiboxTag, PasswordTag, RadioTag, ResetTag, SelectTag, SubmitTag, TextTag, TextareaTag. See the User Guide for details of the bundle attribute for these tags.


Now has header , footer , prefix , suffix attributes. See the User Guide for details of these attributes.


Resource Bundle Support

The bundle attribute for the <msg> and <arg> elements in the Validator configuration file (e.g. validation.xml ) are now supported along with the resource attribute on the <msg> element.

New pages have been added to the struts-examples webapp showing the new Resource Bundle Support and a page for validwhen examples.


Struts has migrated it's source repository from CVS to Subversion, following which the repository has been refactored into subprojects. The subproject re-factoring does not however affect the 1.2.x series which is released from the STRUTS_1_2 branch.


On the people front, in addition to Martin Cooper being appointed the new PMC chair , one new committer, Hubert Rabago , accepted an invitation to join us, and we welcome back David Geary from emeritus to active status.

Detailed Changes

This section contains the details of changes since version 1.2.4 with links to bugzilla tickets and Subversion Revision details. It is split into the following sub-sections.

Version 1.2.7

After Version 1.2.6 was tagged the 1.2 Branch was created and work started on the next version ( 1.3.x series ). Work has continued on both versions and Revision numbers shown in brackets are where a change has been ported from the current development version into the 1.2 Branch .

Modification Revision Bugzilla Description
2005-05-05 168223 n/a Fix 1.2.x Build - remove duplicate "el" directory from "contrib".
2005-05-05 168218 n/a Fix 1.2.x build to include struts-chain in the "contrib" directory (from sandbox STRUTS_1_2_BRANCH).
2005-05-03 168011 ( 168012 ) n/a Prevent NullPointerException when toString() is called before dynaClass is initialized.
2005-04-29 165304 ( 165305 ) n/a Retrieve FormTag stored in Request scope, rather than the TagSupport's findAncestorWithClass() .
2005-04-29 165186 ( 165208 ) n/a Fixing value escape so that both backslashes and quotes are escaped correctly.
2005-04-28 165158 ( 165160 ) 20034 Additional fix to "Invalid cache in InsertTag" for a problem on Orion.
2005-04-28 165097 33989 Fix cactus tests to work with Cactus 1.7.
2005-04-27 164922 ( 164927 ) 23127 Page attribute of img and image tags doesn't use pagePattern setting.
2005-04-26 164814 ( 164831 ) 34624 BeanValidatorForm's getValidationKey method should call mapping.getAttribute().
2005-04-26 164745 ( 164746 ) 31270 Add ActionDispatcher to provide dispatch behavior to classes that do not extend DispatchAction.
2005-04-26 164729 ( 164862 ) 19901 Add a check for null page value and throwing more informative exception.
2005-04-26 164723 ( 164860 ) 16653 Add a check for missing Validator Resources and throw a more useful error message.
2005-04-26 164718 ( 164858 ) 31658 LogonAction does not check errors in appropriate place.
2005-04-25 164734 ( 164703 ) 34314 Add TilesRequestProcessor handling for NoSuchDefinitionException.
2005-04-25 ( 164684 ) 33132 Implement Servlet 2.3/2.4 methods using reflection in MultipartRequestWrapper.
2005-04-25 164591 ( 164590 ) n/a Synchronize the Nested tag attributes for changes made in Bug #17708 and Bug #21603 .
2005-04-23 164343 ( 164340 ) 33122 Resolve <html:link> ClassCastException when a non String paramId value already exists in the params map.
2005-04-21 162109 ( 164337 ) 33918 Allow saving errors to the session in the same way that messages are.
2005-04-21 162094 ( 164334 ) 33238 Change JavascriptValidatorTag to escape double quotes in variable values.
2005-04-12 161093 ( 164336 ) n/a Change DigestingPlugIn to give an explicit message when configSource/configPath yields a null URL.
2005-04-06 160261 ( 160262 ) 21603 Automatic readonly/disabled settings using new <html:form> tag attributes.
2005-04-06 160255 ( 160256 ) 32778 Resolve HTML Link Tag not working with JSTL Loop Tag.
2005-03-31 159608 ( 159609 ) n/a Improve ValidWhen Exception Handling - exceptions are now logged and validation fails returning an error message with details of the error.
2005-03-31 159583 ( 159606 ) n/a A validwhen examples page and validation resource/bundles example pages (Server Side and JavaScript) have been added to the struts-examples webapp.
2005-03-29 159342 n/a Commons Validator dependency changed to version 1.1.4.
2005-03-28 159292 n/a Add "bundle" attribute to El version of JavascriptValidatorTag.
2005-03-28 159269 & 159268 ( 159291 ) 21760 18169 Resolve #21760 Support for non-default resource bundles in validation. Resolve #18169 Resource attribute of msg tag in the validation.xml doesn't work.
2005-03-22 158622 ( 158617 ) 34120 Fix invalid XML in the struts-doc-config.xml file in the Tiles Documentation webapp.
2005-03-20 158267 ( 158730 ) 27089 Add doubleRange validator to the validator-rules.xml
2005-03-19 158216 ( 158727 ) 34027 Name attribute is no longer rendered in the <html:form> tag if the rendering mode is XHTML.
2005-03-14 157398 ( 157399 ) 33876 JavaDoc corrections.
2005-03-14 157395 ( 157397 ) 33998 Fix @link() tags
2005-02-15 153901 ( 164747 ) 866 Add ActionRedirect class to allow adding request parameters to redirecting forwards.
2005-02-09 153065 ( 158605 ) 14042 Resolve memory leaks with JBoss 3.x +(Tomcat/Jetty).
2005-01-06 124417 ( 124418 ) n/a Change DownloadAction to use supplied buffer size.
2004-12-28 123473 32490 Sync up the EL tags with their non-EL counterparts. This adds the 'bundle' attribute to many tags, and also the 'error*' attributes, and 'header', 'footer', 'prefix' and 'suffix' for the Errors tag.
2004-12-27 123447 , 123444 & 123442 ( 123587 ) 32504 32016 Change ModuleException to ensure all constructors invoke super. Resolve #32504 - document the means used to format values in the <bean:write> tag. Resolve #32016 - wrap the hidden token field in a <div> element for HTML 4.01 Strict compliance.
2004-12-12 111630 ( 159674 ) n/a Remove use of "enum" as its a keyword in Java 5.
2004-11-20 106043 n/a 1.2.x Branch created

Version 1.2.6

Modification Revision Bugzilla Description
2004-11-20 106041 n/a Version 1.2.6 tagged
2004-11-20 105966 31642 Resolve <bean:include> always include Session id (if any) even for external Urls (href attribute)
2004-11-20 105965 32283 Two slashes created by TagUtils.getActionMappingURL for webapps in root context
2004-11-20 105963 32265 Add a warning to reset FormFile
2004-11-20 105907 32323 Shale mailreader example should define the servlet version as 2.4
2004-11-19 105888 n/a Changes to update maven build after SVN layout re-org.
2004-11-19 105881 n/a Remove redundant definitions of maven.repo.central and maven.repo.central.directory
2004-11-19 105785 n/a Added ability to load struts, validator, and tiles config files from classloader if not found in the servlet context.
2004-11-19 105787 n/a Better handling of servlet initialization errors to mark the servlet as unavailable and notify the developer of the probable cause.
2004-11-18 76271 n/a Add missing base class for Shale test cases.
2004-11-17 76098 32134 Must use contextRelative to forward to Actions in Default module.
2004-11-13 57587 - 65927
(not consecutive)
Subversion repository rearranged into separate core, el, faces and sandbox subprojects.
2004-11-09 57108 31983 Validator validwhen documentation typo.
2004-11-09 57099 32123 DigestingPlugIn can't load a digester rule file.
2004-11-06 56770 32047 "Created" boolean in FacesRequestProcessor.doForward() not being set
2004-11-05 56678 23924 Improve TagUtils.filter() performance.
2004-11-03 56532 n/a Add LazyValidatorForm
2004-10-30 56018 , 56513 , 56520 n/a Change BeanUtils dependency to 1.7.0, Digester dependency to 1.6 and remove Collections Dependency
2004-10-30 56011 n/a Add "actions/DownloadAction.java", an abstract action that provides the nuts and bolts for downloading files.
2004-10-29 55980 n/a Document that if a link to a forward is used to switch modules, the path must point to an action.
2004-10-26 55577 31399 Message resources file in Struts Blank is misplaced. [ 55584 ] Update README with new layout.
2004-10-26 55576 31348 Using a tiles definition as errorPage causes infinite looping
2004-10-24 55416 31761 NullPointerException in ActionServlet
2004-10-22 55318 31850 Implement Serializable on ActionServletWrapper
2004-10-20 55110 n/a Add documentation to base chain-config.xml to help Tiles users.
2004-10-18 55025 31755 Document the default value for "scope" on an <action> element in the DTD for a struts-config.xml file (along with all the other documentation).

Version 1.2.5

Modification Revision Bugzilla Description
2004-10-17 54947 n/a Version 1.2.5 tagged
2004-10-16 54936 n/a Update several Javadoc parameter names to resolve Javadoc generation warnings
2004-10-16 54892 n/a Remove dependency on commons-lang.
2004-10-16 54889 n/a Update roadmap for 1.2.4 / 1.2.5 releases.
2004-10-09 54187 n/a Move Struts-Faces from "contrib" to the trunk.
2004-10-03 51829 n/a Add header,footer,prefix,suffix attributes to ErrorsTag.
2004-10-03 51825 31481 Have Tiles ControllerSupport execute() call perform() for backward compatibility. To be removed after version 1.2.
2004-10-03 51824 n/a Add validwhen test to compare two Strings containing numbers.
2004-10-03 51823 31514 validwhen validator should do numeric compare when both items convertable to Integer.
2004-10-01 51759 n/a Move repository to Subversion.
2004-09-23 cvs 17708 Better i18n and alternate bundle support for html tags. Add missing "bundle" attribute to tld for html tags. Tags affected are ButtonTag, CancelTag, CheckboxTag, FileTag, FrameTag, HiddenTag, LinkTag, MultiboxTag, PasswordTag, RadioTag, ResetTag, SelectTag, SubmitTag,TextTag, TextareaTag. Also added a test for the bundle attribute for each of the above tags.
2004-09-23 cvs 31212 20417 Add missing nested tag attributes. Resolve #31212 "nested:link module attribute not specified in tld". Resolve #20417 "Attribute idName not declared for NestedRadioTag".
2004-09-23 cvs 31374 Forward path in Validator struts-config.xml in struts-examples incorrect
2004-09-23 cvs n/a Refactor some of the HTML tags make extending them easier.
  • added prepareOtherAttributes() method
  • added prepareName() method
  • use getters rather than instance variables
  • refactored SubmitTag - ButtonTag, CancelTag and ResetTag now inherit from SubmitTag.

Next: Installation