Latest in branch 2.1
2.1.8.1
Released 11 Nov 2009
(16 years ago)
SoftwareApache Struts
Version2.1
RequirementServlet API 2.4,
JSP API 2.0,
Java 5
Initial release2.1.2
25 May 2008
(18 years ago)
Latest release2.1.8.1
11 Nov 2009
(16 years ago)
Support statusNo
Release noteshttps://github.com/apache/struts/releases/tag/STRUTS_2.1.8.1
Source codehttps://github.com/apache/struts/tree/STRUTS_2.1.8.1
Documentationhttps://javadoc.io/doc/org.apache.struts/struts2-core/2.1.8.1/index.html
Downloadhttps://mvnrepository.com/artifact/org.apache.struts/struts2-core/2.1.8.1
Apache Struts 2.1 ReleasesView full list

What Is New in Apache Struts 2.1

This release focuses on major framework upgrades and plugin consolidation. Here's a quick summary of the key changes.

Category Key Changes
New Features Convention Plugin integration, Portlet 2.0 support, New REST plugin
Improvements Reduced configuration, Enhanced JUnit support, Better i18n
Deprecated Codebehind Plugin, ActionMapperUtils class
Bug Fixes Various issues across core, tags, and plugins

How did plugin architecture change in 2.1?

The biggest shift was making the Convention Plugin a core part of the framework. This move away from XML configuration means you can use annotations and conventions for zero-config actions.

In practice, this simplifies development by eliminating huge amounts of struts.xml boilerplate. The old Codebehind plugin was officially deprecated in favor of this new approach.

What portlet support was added?

Full Portlet 2.0 (JSR-286) support was introduced. This lets you build Struts applications that run within portlet containers like Liferay or IBM WebSphere Portal.

The update includes new portlet-specific interceptors and components. This matters because it aligns Struts with modern enterprise portal requirements without needing custom hacks.

Were there any testing improvements?

Yes, JUnit support got a significant upgrade. The StrutsTestCase and StrutsSpringTestCase classes were enhanced to make unit and integration testing more straightforward.

You can now test your actions more effectively with better mock objects and setup utilities. This was a common pain point in earlier versions that received focused attention.

What happened to the REST plugin?

The REST plugin was completely rewritten from the ground up. The new version provides a cleaner, more flexible approach to building RESTful web services with Struts.

It offers better content negotiation and HTTP method handling. If you're building APIs, this rewrite makes Struts a much more viable option compared to dedicated REST frameworks.

FAQ

Is the Convention Plugin now required in Struts 2.1?
No, it's not required but it's now bundled as the preferred approach. You can still use traditional XML configuration if needed, but the convention-based approach reduces configuration significantly.

Does the Portlet 2.0 support break compatibility with Portlet 1.0?
Yes, the Portlet 2.0 support is not backward compatible with Portlet 1.0. You'll need to update your portlet applications to meet the JSR-286 specification.

What should I use instead of the deprecated Codebehind plugin?
Use the Convention Plugin that's now included in the core. It provides the same zero-configuration functionality but with better implementation and ongoing support.

Were there any changes to internationalization support?
Yes, i18n support was improved with better resource loading and message resolution. The framework now handles localized messages more efficiently across different contexts.

How does the REST plugin rewrite affect existing applications?
Existing applications using the old REST plugin will need to be updated. The new implementation has different configuration and API patterns, so some migration work will be required.

Releases In Branch 2.1

VersionRelease date
2.1.8.111 Nov 2009
(16 years ago)
2.1.829 Sep 2009
(16 years ago)
2.1.613 Jan 2009
(17 years ago)
2.1.225 May 2008
(18 years ago)