Apache Struts
By Apache Software Foundation
Apache Struts is an open-source Java framework for building enterprise web applications using the Model-View-Controller (MVC) pattern, developed under the Apache Software Foundation. It provides a structured way to map incoming HTTP…
Definition
Apache Struts is an open-source Java framework for building enterprise web applications using the Model-View-Controller (MVC) pattern, developed under the Apache Software Foundation. It provides a structured way to map incoming HTTP requests to Java action classes and render responses through configurable view technologies, and it was widely adopted in enterprise Java shops during the 2000s for standardizing large web application codebases.
Overview
Apache Struts was created to bring order to early Java web development, which at the time often mixed request handling, business logic, and page rendering together inside servlets and JSP pages in ways that became hard to maintain as applications grew. Struts introduced a clear MVC separation, where incoming requests are routed to dedicated action classes that handle logic and hand off to a view layer for rendering, a pattern that strongly influenced later Java web frameworks. Mechanically, Struts centers on a front controller servlet that receives all incoming requests and dispatches them, based on XML or annotation configuration, to action classes implementing specific interfaces. Those actions perform business logic, populate form beans or value objects, and return a result string that the framework maps to a particular view, historically a JSP page, through a configuration file that ties URLs, actions, and views together explicitly. Among Java web frameworks, Struts sits alongside JavaServer Faces and Spring MVC as one of the major MVC options from that era, though its configuration-heavy approach and history of significant security vulnerabilities in its later versions distinguish it from Spring's more modular, dependency-injection-centric design. It predates the shift toward annotation-driven, convention-over-configuration frameworks that later became more common in the Java ecosystem. In practice, Struts was used extensively in large enterprise applications, particularly in banking, government, and insurance systems built during the 2000s and early 2010s, many of which remain in production today as legacy systems. Some of these organizations have layered modern authentication and monitoring tooling around their existing Struts deployments rather than replacing the framework outright, treating it as a stable core they continue to operate cautiously. Organizations maintaining these applications often continue supporting Struts rather than rewriting them, given the cost and risk of migrating large, business-critical codebases. The framework's reputation has been significantly affected by a series of serious security vulnerabilities discovered in its Struts 2 branch, some of which were exploited in high-profile breaches, making rigorous patching a mandatory practice for any team still running it. New projects rarely choose Struts today, with Spring Boot and other modern Java frameworks generally preferred for new enterprise web development. Migrating such a system typically requires rebuilding both the action layer and the view layer simultaneously, which is a substantial undertaking that many organizations postpone as long as the existing application remains stable and adequately secured. Security researchers continue to scrutinize the Struts codebase closely given its installed base, which means organizations still running it need a disciplined patch-monitoring process rather than a one-time hardening effort.
Key Features
- Model-View-Controller architecture for structuring Java web applications
- Front controller servlet dispatching requests to configured action classes
- XML and annotation-based configuration mapping URLs to actions and views
- Historically paired with JSP for rendering, though other view technologies exist
- Influenced later Java MVC frameworks including Spring MVC
- Widely deployed in large enterprise systems built in the 2000s
- Long history of significant security vulnerabilities requiring careful patching
- Maintained under the Apache Software Foundation
Use Cases
Alternatives
Frequently Asked Questions
From the Blog
Introduction to Apache Spark for Beginners
Apache Spark is a fast, distributed engine for processing huge datasets across many machines. Learn what it is, how it works, and how to run your first job.
Read More AI & TechnologyWhat Is PySpark? Python's Gateway to Big Data
PySpark is the Python API for Apache Spark, letting developers process massive datasets across many machines using familiar Python syntax. This guide covers what PySpark does, its core components, and when to reach for it.
Read More