Apache Struts

{{Short description|Open-source web application framework}}

{{for|the predecessor of Apache Struts 2|Apache Struts 1}}

{{Infobox software

| name = Apache Struts 2

| logo = File:Apache Struts 2 logo.svg

| developer = Apache Software Foundation

| released = {{Start date and age|2006|10|10}}

| latest release version = 7.0.3

| latest release date = {{Start date and age|2025|03|07}}{{ cite web | url=https://github.com/apache/struts/releases/tag/STRUTS_7_0_3 |title=Struts 7.0.3 | access-date=16 March 2025}}

| replaces = Apache Struts 1

| operating system = Cross-platform

| programming language = Java

| platform = Cross-platform (JVM)

| genre = Web framework

| license = Apache License 2.0

| website = {{Official URL}}

}}

Apache Struts 2 is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. The WebWork framework spun off from Apache Struts 1 aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework. In December 2005, it was announced that WebWork 2.2 was adopted as Apache Struts 2, which reached its first full release in February 2007.[http://struts.apache.org/release/2.2.x/ About Apache Struts 2] {{webarchive |url=https://web.archive.org/web/20140114170139/http://struts.apache.org/release/2.2.x/ |date=January 14, 2014 }}

Struts 2 has a history of critical security bugs,{{cite web |url=https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-6117/Apache-Struts.html |title=Apache Struts : List of security vulnerabilities |website=cvedetails.com |access-date=October 2, 2017}} many tied to its use of OGNL technology;{{cite web |url=https://community.saas.hpe.com/t5/Security-Research/Struts-2-OGNL-Expression-Injections/ba-p/288881#.WdL6ca2ZNxw |archive-url=https://web.archive.org/web/20171003124645/https://community.saas.hpe.com/t5/Security-Research/Struts-2-OGNL-Expression-Injections/ba-p/288881#.WdL6ca2ZNxw |url-status=dead |archive-date=October 3, 2017 |title=Struts 2: OGNL Expression Injections |first=Alvaro |last=Munoz |website=HPE.com |date=January 14, 2014 |access-date=October 2, 2017 }} some vulnerabilities can lead to arbitrary code execution. In October 2017, it was reported that failure by Equifax to address a Struts 2 vulnerability advised in March 2017 was later exploited in the data breach that was disclosed by Equifax in September 2017.{{cite web |url=https://www.theregister.co.uk/2017/10/02/equifax_ceo_richard_smith_congressional_testimony/?mt=1506988904204 |title=Equifax couldn't find or patch vulnerable Struts implementations |first=Richard |last=Chirgwin |website=The Register |date=October 2, 2017 |access-date=October 2, 2017}}{{cite web |url=https://arstechnica.com/information-technology/2017/10/a-series-of-delays-and-major-errors-led-to-massive-equifax-breach/ |title=A series of delays and major errors led to massive Equifax breach |first=Dan |last=Goodin |website=Ars Technica |date=October 2, 2017 |access-date=October 2, 2017}}

Features

  • Simple POJO-based actions{{sfn | Newton | 2009 | loc=§1 Struts and Agile Development - Actions| p=9}}
  • Simplified testability
  • Thread safe
  • AJAX support
  • jQuery plugin
  • Dojo Toolkit plugin{{sfn | Newton | 2009 | loc=§13 Rich Internet Applications - Dojo tags| p=258}} (deprecated)
  • Ajax client-side validation
  • Template support{{sfn | Newton | 2009 | loc=§12 Comprehensive Testing - Detour: Struts and Spring in a nutshell| p=294}}
  • Support for different result types{{sfn | Newton | 2009 | loc=§4 Results and Result Types - Dojo tags| pp=57-81}}
  • Easy to extend with plugins
  • REST plugin{{sfn | Newton | 2009 | loc=§12 Themes and Templates - The REST plug-in| pp=249-255}} (REST-based actions, extension-less URLs)
  • Convention plugin (action configuration via Conventions and Annotations)
  • Spring plugin{{sfn | Newton | 2009 | loc=§13 Comprehensive Testing - Detour: Struts and Spring in a nutshell| p=294}} (dependency injection)
  • Hibernate plugin
  • Support in design
  • JFreechart plugin (charts)
  • jQuery plugin (Ajax support, UI widgets, dynamic table, charts)
  • Rome plugin

See also

{{Portal|Free and open-source software|Computer programming}}

Citations

{{Reflist}}

References

  • {{cite book | last=Newton | first=Dave | title=Apache Struts 2 Web Application Development | publisher=Packt Publishing | date=2009 | isbn=978-1-84719-339-1}}