Struts 2 Introduction

Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.
Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts2. This new version of Struts is simpler to use and closer to how Struts was always meant to be.
What is Framework ?
A web application framework is a piece of structural software that provides automation of common tasks of the domain as well as a built-in architectural solution that can be easily inherited by applications implemented on the framework.
The high-level design of Struts 2 follows the well-established Model-View-Controller design pattern. The MVC design pattern identifies three distinct concerns: model, view, and controller. In Struts 2, these are implemented by the action, result, and FilterDispatcher, respectively. When writing a Model 2 application, it is our responsibility to provide a controller as well as write action classes. Our controller must be able to do these:
  1. Determine from the URI what action to invoke.
  2. Instantiate the action class.
  3. If an action object exists, populate the action's properties with request parameters.
  4. If an action object exists, call the action method.
  5. Forward the request to a view (JSP).

Apache Struts 2 requires:

  • Servlet API 2.4
  • JSP API 2.0
  • Java 5


Latest Tutorial

Most Visited Tutorial