Apache Struts 1

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

Apache Struts
File:Struts logo.gif
Original author(s) Craig McClanahan
Developer(s) Apache Software Foundation
Initial release May 2000 (2000-05)
Last release 1.3.10 / December 8, 2008 (2008-12-08)
Development status End-of-life,[2] superseded by Apache Struts 2
Written in Java
Operating system Cross-platform
Platform Cross-platform (JVM)
License Apache License 2.0
Website struts.apache.org

Apache Struts 1 is a discontinued 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. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top-level Apache project in 2005.

The WebWork framework spun off from Apache Struts aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework. However, it was announced in December 2005 that Struts would re-merge with WebWork. WebWork 2.2 has been adopted as Apache Struts 2, which reached its first full release in February 2007.

Design goals and overview

In a standard Java EE web application, the client will typically call to the server via a web form. The information is then either handed over to a Java Servlet which interacts with a database and produces an HTML-formatted response, or it is given to a JavaServer Pages (JSP) document that intermingles HTML and Java code to achieve the same result. Both approaches are often considered inadequate for large projects because they mix application logic with presentation and make maintenance difficult.

The goal of Struts is to separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velocity are also supported). The web application programmer is responsible for writing the model code, and for creating a central configuration file struts-config.xml that binds together model, view, and controller.

Requests from the client are sent to the controller in the form of "Actions" defined in the configuration file; if the controller receives such a request it calls the corresponding Action class that interacts with the application-specific model code. The model code returns an "ActionForward", a string telling the controller what output page to send to the client. Information is passed between model and view in the form of special JavaBeans. A powerful custom tag library allows it from the presentation layer to read and write the content of these beans without the need for any embedded Java code.

Struts is categorized as a Model 2 request-based web application framework.[3]

Struts also supports internationalization by web forms, and includes a template mechanism called "Tiles" that (for instance) allows the presentation layer to be composed from independent header, footer, menu navigation and content components.

See also

References

  1. Apache Struts 1 EOL Press Release
  2. Apache Struts 1 EOL Announcement
  3. Lua error in package.lua at line 80: module 'strict' not found.

Bibliography

External links

  • No URL found. Please specify a URL here or add one to Wikidata.