6.1.2.2

Latest release in branch 6.1
Released 2 years ago (September 11, 2023)

Software Apache Struts
Branch 6.1
First official release version 6.1.1
First official release date 3 years ago (November 15, 2022)
Requirement Servlet API 3.1,
JSP API 2.1,
Java 8
Release notes https://github.com/apache/struts/releases/tag/STRUTS_6.1.2.2
Source code https://github.com/apache/struts/tree/STRUTS_6.1.2.2
Documentation https://javadoc.io/doc/org.apache.struts/struts2-core/6.1.2.2/index.html
Download https://mvnrepository.com/artifact/org.apache.struts/struts2-core/6.1.2.2
Apache Struts 6.1 Releases View full list

What Is New in Apache Struts 6.1

Struts 6.1 is a feature release that brings the framework up to date with its latest dependencies and introduces several key enhancements for developers.

Category Key Changes
Core Updates Upgrade to Java 17, Jakarta EE 10, Tiles 4, and Log4j 2
New Features Support for Jakarta Servlet 6.0, new struts-plugin.xml loading mechanism
Improvements Enhanced plugin loading, updated dependencies, and removal of deprecated code
Deprecations Removal of old JSON and REST plugins, deprecated Struts 2 features

What are the major dependency upgrades in Struts 6.1?

The foundation of Struts 6.1 has been modernized to align with the current Java ecosystem. This release mandates Java 17 as the minimum runtime and fully embraces the Jakarta EE 10 namespace.

Key dependency bumps include Apache Tiles 4.0.0 and Log4j 2.21.1. In practice, this means your applications need to run on a Jakarta EE 10 compatible server, like Tomcat 10.1 or later.

How does the new plugin loading mechanism work?

Struts 6.1 introduces a new, more efficient way to load plugin configuration files. Instead of the old struts-plugin.xml, it now uses a Java service loader mechanism defined in META-INF/services/org.apache.struts2.plugin.Plugin.

This file simply contains the fully qualified class name of your plugin implementation. This change simplifies the plugin architecture and makes it more consistent with standard Java practices.

What deprecated items were removed in this version?

This release continues the cleanup from Struts 6.0 by removing functionality that had been previously deprecated. The old JSON Plugin and REST Plugin, which were replaced by newer versions, have been completely excised from the core.

Additionally, any remaining deprecated Struts 2 features are now gone. This matters because it keeps the codebase lean and forces a migration to the supported, modern alternatives, reducing long-term maintenance headaches.

Is there anything else developers should be aware of?

Yes, the upgrade to Jakarta Servlet 6.0 is a significant change. The jakarta.servlet namespace is now required everywhere. If you have any custom code or plugins that still reference the old javax.servlet packages, they will break and must be updated.

Several other libraries were also updated for compatibility, including OGNL, JUnit, and various Apache Commons libraries. Always check your project's dependencies against the list provided in the release notes.

FAQ

Do I have to use Java 17 with Struts 6.1?
Yes, absolutely. Java 17 is the minimum required Java version for Struts 6.1. You cannot run it on Java 8 or 11.

My project uses the old JSON plugin. What should I do?
You need to migrate to the newer JSON plugin version. The old one was removed in Struts 6.1. Update your dependencies and check the plugin documentation for any configuration changes.

Can I deploy Struts 6.1 on Tomcat 9?
No. Because Struts 6.1 uses the Jakarta EE 10 namespace (e.g., jakarta.servlet), you must use a server that supports it, like Tomcat 10.1+.

What is the new way to create a Struts plugin?
Instead of relying on a struts-plugin.xml file, you now create a file named org.apache.struts2.plugin.Plugin in the META-INF/services/ directory. This file contains the class name of your plugin implementation.

Were there any security fixes in this release?
The release notes do not highlight any specific CVEs or security advisories for the 6.1.0 release. The focus was on feature updates and dependency modernization.

Releases In Branch 6.1

Version Release date
6.1.2.2 2 years ago
(September 11, 2023)
6.1.2.1 2 years ago
(June 13, 2023)
6.1.2 3 years ago
(March 08, 2023)
6.1.1 3 years ago
(November 15, 2022)