(tick) These are the notes for the Struts version 7.0.0-M1 distribution.

(tick) For prior notes in this release series, see Version Notes 6.3.0

Maven users

If you are a Maven user, you might want to get started using the Maven Archetype.

Maven Dependency
<dependency>
  <groupId>org.apache.struts</groupId>
  <artifactId>struts2-core</artifactId>
  <version>7.0.0-M1</version>
</dependency>

You can also use Struts Archetype Catalog like below

Struts Archetype Catalog
mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/
Staging Repository
<repositories>
  <repository>
    <id>apache.nexus</id>
    <name>ASF Nexus Staging</name>
    <url>https://repository.apache.org/content/groups/staging/</url>
  </repository>
</repositories>

Internal Changes

  • Java 17 is used as minimal supported version
  • Migrated to JakartaEE

Bug

  • [WW-3257] - Get Controller bean from Spring
  • [WW-3427] - If you alias a property that uses a custom TypeConverter and it throws TypeConversionException the error is never caught
  • [WW-3429] - <input> tag generated by <s:checkbox> produce HTML warning in validators
  • [WW-3447] - convention plugin has no testcases
  • [WW-3464] - Wildcard Mappings, Last one loses.
  • [WW-3571] - Anchor tag is providing a default value for href attribute when it should not
  • [WW-3647] - Adding a jndi-lookup Spring bean breaks ServletActionRedirectResult
  • [WW-3655] - Freemarker result loads request uri as template
  • [WW-3784] - Greedy and non-greedy matching behaviour should work in action methods using annotated wildcards
  • [WW-3792] - s:checkbox (org.apache.struts2.components.Checkbox) generates span instead of div when using labelposition="left"
  • [WW-4323] - Ability to accept params purely by implementing ParamNameAware is broken
  • [WW-4364] - Form @id and @name are not actually unique
  • [WW-4418] - Plugin script resources don't load when action extension is blank
  • [WW-4530] - The ExceptionMappingInterceptor extends MethodFilterInterceptor
  • [WW-5110] - java.lang.ClassCastException: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter cannot be cast to jakarta.servlet.Filter

New Feature

  • [WW-3476] - Allow overwriting of constants for each package
  • [WW-3541] - Request Parameter to Action Object Mapping Plugin for Insecure Direct Object References
  • [WW-3624] - allow regex matching on fielderror tag
  • [WW-3680] - recursive iterator options
  • [WW-3717] - Http Method as part of action mapping
  • [WW-3720] - Support collection-based properties in .xml
  • [WW-4366] - Action methods should accept arguments like @QueryParam, @FormParam, @PathParam and specific request methods GET, PUT, POST etc
  • [WW-5111] - Define ActionSupplier interface to allow create actions on fly
  • [WW-5141] - Support for JEE 9+
  • [WW-5177] - Support testing with JUnit 5
  • [WW-5372] - JEE9 Support(Jakarta namespacing) for struts2 core

Improvement

  • [WW-2934] - conversion error should short-circuit all validators
  • [WW-2975] - client side validation and components with forms
  • [WW-3193] - Form action always inherits parent extension
  • [WW-3232] - New Cookie Interceptor
  • [WW-3245] - Jasper plugin does not support supply of data via report parameters (for example Hibernate session object)
  • [WW-3262] - improve wildcard to support regular expressions
  • [WW-3338] - <s:hidden> tag should interpret its value attribute same as the other tags do.
  • [WW-3499] - AnnotationParameterFilterIntereptor should support deep OGNL
  • [WW-3516] - Add <div> tag to <s:checkboxlist> UI Tag
  • [WW-3630] - Add global Failure result
  • [WW-3871] - TypeConversion annotation support improvement
  • [WW-4016] - Rename validatorType to validatorName
  • [WW-4164] - Improve support for multiple extensions
  • [WW-4203] - Allow disabling xwork creating null objects on a property level
  • [WW-4272] - Add a fieldKey attribute to validators
  • [WW-4311] - HttpHeaderResult should allow to provide a body for the response
  • [WW-4340] - Grouping same type validators
  • [WW-4353] - Automatic mapping from URL to methods in action classes
  • [WW-4356] - Implement new Sitemesh plugin based on Sitemesh3
  • [WW-4382] - Enhance Single Character Test
  • [WW-4393] - Move FreeMarker support into dedicated plugin
  • [WW-4394] - Move JSP support into dedicated plugin
  • [WW-4409] - Modify the TokenInterceptor not to lock the session object while handling and invalid token
  • [WW-4463] - Support propagating ognl errors other than NoSuchPropertyException
  • [WW-4496] - better reconciliation of static url mappings
  • [WW-4498] - Replace excludeParams with additionalExcludeParams in ParametersInterceptor
  • [WW-4520] - Add prefix for CSS classes
  • [WW-4611] - Drop autogenerated IDs
  • [WW-4798] - A dedicated plugin should be used to reload configuration in development mode
  • [WW-4807] - Allow define custom Voters to be used with SecurityMemberAccess
  • [WW-4872] - Drop FileManager layer and file re-loading functionality
  • [WW-4935] - Support for sub-resources in rest-plugin
  • [WW-5066] - Allow references to struts constants from within the same (or included) XML configuration files.
  • [WW-5303] - Use escapedId instead instead of id
  • [WW-5305] - Uses dedicated maps implementations in ActionContext instead of using raw Map
  • [WW-5306] - Remove the Portlet plugin
  • [WW-5335] - Adjusts Jenkins & Github build files to use JDK17
  • [WW-5353] - Implement stronger security defaults in Struts 7.0
  • [WW-5356] - Refactor cache implementations to use extension point
  • [WW-5366] - Remove support for uploading of empty files
  • [WW-5367] - Re-define a minimal library set for JakartaEE
  • [WW-5385] - Decompose StrutsVelocityContext for better reuse

Task

  • [WW-2278] - Move S2 Tags into a plugin
  • [WW-3472] - SiteMesh Plugin document improvements
  • [WW-3714] - Rename org.opensymphony.xwork2 to org.apache.struts2.xwork2

Dependency

  • [WW-5209] - Upgrade to Jakarta Bean Validation 3.0

Other resources