What Is New in Apache Struts 6.6
Struts 6.6 is a maintenance release that focuses on dependency upgrades and internal improvements. It keeps the framework current with the latest third-party libraries and addresses several bugs from previous versions.
| Category | Key Changes |
|---|---|
| Dependency Upgrades | Updates to Log4j 2, Tiles, and other core libraries. |
| Bug Fixes | Resolves issues with file uploads, OGNL expressions, and configuration handling. |
| Internal Improvements | Code cleanup and removal of deprecated elements. |
Which dependencies were upgraded?
The core of this release is updating the libraries Struts depends on. This is crucial for maintaining compatibility and pulling in the latest fixes from those projects.
Key upgrades include moving to Apache Tiles 3.0.10 and Log4j 2.23.1. We also updated several plugins and moved the framework to Java 17 as the minimum required version, which reflects the modern Java ecosystem.
What specific bugs were squashed?
This version tackles a handful of pesky bugs that developers encountered in the wild. The fixes are targeted and improve the overall stability of the framework.
File Upload Handling
An issue where the ContentType property was incorrectly set during file uploads has been resolved. This ensures uploaded files are processed correctly.
OGNL Expression Evaluation
A fix was applied for a problem where OGNL expressions within certain tags, like <s:submit>, weren't being evaluated as expected, which could break dynamic UI behavior.
Were there any breaking changes or deprecations?
Struts 6.6 continues the cleanup process by removing legacy code that was previously marked for removal. This keeps the codebase lean and modern.
The deprecated SwitchAction and related constants have been completely removed. If you're still using this, you'll need to refactor your code to use a different approach for mapping requests, like convention-based configuration.
FAQ
Is the Log4j upgrade in Struts 6.6 a security patch?
No, the move to Log4j 2.23.1 is a routine version bump. It includes the latest features and non-security fixes from the Log4j project but is not specifically a response to a vulnerability.
I use SwitchAction in my application. What should I do?
You need to migrate away from it immediately as it has been removed. Look into using the Convention Plugin or manual configuration in your struts.xml to handle your mappings instead.
Why was the Java minimum version bumped to 17?
This aligns Struts with the current Long-Term Support (LTS) release of Java. It allows the framework to use newer language features and APIs, and most enterprise environments have already standardized on Java 11 or 17.
Does this release change how file uploads work?
No, the API remains the same. The fix only corrects an internal bug where the content type metadata was being set incorrectly, making the feature work as originally intended.
Are there any new features for developers in this release?
Struts 6.6 is primarily a maintenance release focused on underlying improvements and fixes. The main benefit for developers is a more stable and up-to-date foundation rather than new APIs or functionality.