6.4.0

Latest release in branch 6.4
Released 2 years ago (April 07, 2024)

Software Apache Struts
Branch 6.4
First official release version 6.4.0
First official release date 2 years ago (April 07, 2024)
Requirement Servlet API 3.1,
JSP API 2.1,
Java 8
Release notes https://github.com/apache/struts/releases/tag/STRUTS_6.4.0
Source code https://github.com/apache/struts/tree/STRUTS_6.4.0
Documentation https://javadoc.io/doc/org.apache.struts/struts2-core/6.4.0/index.html
Download https://mvnrepository.com/artifact/org.apache.struts/struts2-core/6.4.0
Apache Struts 6.4 Releases View full list

What Is New in Apache Struts 6.4

Struts 6.4 is a feature and maintenance release that builds on the Jakarta EE 10 foundation. It introduces new capabilities, refines existing ones, and addresses several bugs from previous versions.

Category Key Highlights
New Features New struts-plugin-bom, Jakarta RESTful Web Services (JAX-RS) support via Convention Plugin, new struts-plugin.xml properties.
Improvements Enhanced Convention Plugin, better JSON handling, updated dependencies, and new configuration options.
Bug Fixes Resolved issues with file uploads, OGNL expressions, and plugin configuration loading.
Deprecations Marked several legacy features for removal in future versions.

What are the major new features?

The headline addition is the new Bill of Materials (BOM) for plugins. The struts-plugin-bom simplifies dependency management by ensuring all your Struts plugins are aligned on the same version, which is a huge time-saver for multi-module projects.

JAX-RS support has been integrated through the Convention Plugin. This allows you to build RESTful web services using Jakarta EE standards alongside your existing MVC actions, offering more flexibility in how you structure your application's endpoints.

New properties in struts-plugin.xml give plugin developers finer control. You can now set allowStaticMethodAccess and allowStaticFieldAccess directly in your plugin configuration, which is much cleaner than dealing with this globally.

How has the Convention Plugin improved?

The Convention Plugin is now smarter about finding your classes. It can automatically discover and map JAX-RS resources (annotated with @Path) without any additional configuration, seamlessly integrating REST into your Struts app.

It also introduces a new default interceptor stack specifically for these REST actions. This stack is tailored for stateless, HTTP-based interactions, making it more appropriate than the full default stack used for traditional form submissions.

What dependencies and integrations were updated?

The core framework dependencies have been bumped to their latest stable versions. This includes updates to Hibernate Validator 8.0, Tiles 3.1, and ASM 9.6, ensuring better performance and compatibility with the wider Java ecosystem.

For JSON processing, the bundled version of Jackson has been updated. This matters because it often includes performance optimizations and fixes for edge cases in serialization and deserialization that can be a pain to debug.

What bugs did this release squash?

A notable fix resolves an issue where the struts-plugin.xml file from a JAR wasn't being loaded if the framework was running in a modular environment (JPMS). This could silently break plugins, so getting it fixed is a big win.

Other corrections address problems with file uploads and OGNL expression handling. These are the kinds of fixes that directly remove headaches developers face during everyday coding and debugging sessions.

What's being deprecated?

This release continues the cleanup from the Java EE to Jakarta EE transition. Several legacy features and classes that were already replaced are now formally marked with the @Deprecated annotation, signaling they will be removed in Struts 7.

In practice, this means you should check your code for any usage of these deprecated elements and start planning your migration to their modern replacements to ensure a smooth upgrade path later.

FAQ

Do I need to change my code to use the new plugin BOM?
No, the BOM is an additive feature. You can import it in your Maven or Gradle build to manage plugin versions more easily, but your existing application code remains unchanged.

Can I use the new JAX-RS support without the Convention Plugin?
No, the JAX-RS integration is specifically a feature of the Convention Plugin. It handles the automatic discovery and configuration of your REST resources.

Why would I use JAX-RS in Struts instead of a dedicated framework?
It's for incremental adoption. If you have a large Struts MVC application and want to add a few REST APIs without introducing a completely new framework, this provides a integrated path.

Is the file upload bug fix backward compatible?
Yes, the fix restores expected behavior. It shouldn't break any existing working code and instead fixes cases where uploads previously failed under specific conditions.

Where can I find the list of deprecated items?
The full list is in the official 6.4.0 Version Notes. Look for the "Deprecations" section, which details each deprecated class and method.

Releases In Branch 6.4

Version Release date
6.4.0 2 years ago
(April 07, 2024)