"I've had nothing yet, so I can't take more."
"You mean you can't take less. It's very easy to take more than nothing."
This section contains release notes for changes that have taken place to Struts, since the Version 1.3.5 distribution. To keep up-to-date on all changes to the framework, subscribe to the (commits at struts.apache.org) list. To preview our plans for upcoming changes, please visit the Roadmap page.
The following dependencies have changed:
validator-rules-compressed.xml
config file.
You can also access to the Apache Struts source repository and change logs directly through both web browser and Subversion client interfaces.
An action mapping may now may be given an identifier by the new actionId
property which uniquely identifies the mapping within a module:
<action path="/person/view" type="..." input="..."> <set-property property="actionId" value="viewPersonAction" /> <forward name="success" path="person.jsp" /> </action>
Just as the TilesRequestProcessor
could recognize a tile definition
and resolve it to the intended JSP, so does Struts now have built-in
recognition for URIs that begin with an actionId
and will automatically
translate forwards. Both these forwards below will be resolved internally
to /person/view.do
(with parameters included):
<forward name="success" path="viewPersonAction" /> <forward name="success" path="viewPersonAction?fruit=banana&color=yellow" />
You can effectively eliminate all URI management throughout the Struts configuration
files and within JSP. The tag libraries are also updated to recognize the
actionId
:
<html:form action="savePersonAction">...</html:form> <html:link action="viewPersonAction">...</html:link>
Note: It is good practice to name the actionId
as entityAction
to distinguish the identifier from, perhaps, a Tiles definition named entityPage.
Struts tag libraries now include the HTML I18N properties. This allows sites that specialize in internationalization to specify both bi-directional text and language at the tag level:
<html:link action="viewPersonAction" dir="ltor" lang="es"/>vea a persona</html:link>
The Struts <html:link>
, <html:frame>
,
<html:rewrite>
tag libaries now allow their bodies to nest the new
<html:param>
tag. This is useful when it is awkward (or inappropriate)
to pass in existing parameters as a Map
, which is still supported and will
be appened to any present <html:param>
tags:
<html:link action="viewPersonAction"> View Profile of A Struts Developer <html:param name="id" value="1" /> <html:param name="name" value="Ted Husted" /> </html:link>
PropertyMessageResources
now has a compatibility mode
option which allows it to be configured to operate in modes compatible with
either JSTL or PropertyResourceBundle
(as well as the
backwardly compatible default mode). To use the new modes configure
the the message resources in the struts-config.xml
in the
following way (note the use of the key attribute
in <set-property>
):
<message-resources parameter="...."> <set-property key="mode" value="JSTL"/> // JSTL mode </message-resources> <message-resources parameter="...."> <set-property key="mode" value="resource"/> // PropertyResourceBundle mode </message-resources>
PropertyResourceBundle
compatibility option for PropertyMessageResources