Jakarta Struts
   HOME

TheInfoList



OR:

Apache Struts 1 is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
web application framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and ...
for developing
Java EE Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web se ...
web application A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection. History In earlier computing models like client-serve ...
s. It uses and extends the
Java Servlet A Jakarta Servlet (formerly Java Servlet) is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web applicatio ...
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
to encourage developers to adopt a
model–view–controller Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of infor ...
(MVC) architecture. It was originally created by
Craig McClanahan Craig R. McClanahan is a programmer and original author of the Apache Struts framework for building web applications. He was part of the expert group that defined the servlet 2.2, 2.3 and JSP 1.1, 1.2 specifications. He is also the architect of ...
and donated to the
Apache Foundation The Apache Software Foundation (ASF) is an American nonprofit corporation (classified as a 501(c)(3) organization in the United States) to support a number of open source software projects. The ASF was formed from a group of developers of the Ap ...
in May 2000. Formerly located under the Apache
Jakarta Project The Jakarta Project created and maintained open source software for the Java platform. It operated as an umbrella project under the auspices of the Apache Software Foundation, and all Jakarta products are released under the Apache License. As ...
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 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 ...
, which reached its first full release in February 2007.


Design goals and overview

In a standard
Java EE Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web se ...
web application, the client will typically call to the server via a
web form A webform, web form or HTML form on a web page allows a user to enter data that is sent to a Server (computing), server for processing. Forms can resemble form (document), paper or database forms because web users fill out the forms using checkboxe ...
. The information is then either handed over to a
Java Servlet A Jakarta Servlet (formerly Java Servlet) is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web applicatio ...
which interacts with a database and produces an
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
-formatted response, or it is given to a
JavaServer Pages Jakarta Server Pages (JSP; formerly JavaServer Pages) is a collection of technologies that helps software developers create dynamically generated web pages based on HTML, XML, SOAP, or other document types. Released in 1999 by Sun Microsystems, J ...
(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 Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
/
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subse ...
and
Velocity Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity i ...
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 In computing based on the Java Platform, JavaBeans is a technology developed by Sun Microsystems and released in 1996, as part of JDK 1.1. The 'beans' of JavaBeans are classes that encapsulate one or more objects into a single standardized obj ...
. 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. Struts also supports
internationalization In economics, internationalization or internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strateg ...
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

*
Comparison of web frameworks Two comparisons of web frameworks are available: * Comparison of JavaScript-based web frameworks (front-end) * Comparison of server-side web frameworks This is a comparison of notable web frameworks, software used to build and deploy web applica ...


References


Bibliography

* James Holmes: Struts: The Complete Reference, McGraw-Hill Osborne Media, * Bill Dudney and Jonathan Lehr: Jakarta Pitfalls, Wiley, * Bill Siggelkow: Jakarta Struts Cookbook, O'Reilly, * James Goodwill, Richard Hightower: Professional Jakarta Struts,
Wrox Press Wrox Press (established in 1992) is a computer book publisher, originally based in Birmingham, England. Wrox uses a "programmer to programmer" approach, as all books published by Wrox are written by software developers. The original books were ea ...
, * John Carnell and Rob Harrop: Pro Jakarta Struts, Second Edition, Apress, * John Carnell,
Jeff Linwood Jeff is a masculine name, often a short form ( hypocorism) of the English given name Jefferson or Jeffrey, which comes from a medieval variant of Geoffrey. Music * DJ Jazzy Jeff, American DJ/turntablist record producer Jeffrey Allen Townes ...
and
Maciej Zawadzki Maciej (Polish pronunciation: ) is a Polish given name, the etymological equivalent of Matthias. Its diminutive forms are Maciek, Maciuś. Namedays according to Polish calendar: 30 January, 24 February, 14 May Maciej may refer to: Arts and ente ...
: Professional Struts Applications: Building Web Sites with Struts, ObjectRelationalBridge, Lucene, and Velocity, Apress, *
Ted Husted TED may refer to: Economics and finance * TED spread between U.S. Treasuries and Eurodollar Education * ''Türk Eğitim Derneği'', the Turkish Education Association ** TED Ankara College Foundation Schools, Turkey ** Transvaal Education Depart ...
, etc.: Struts in Action, Manning Publications Company,
Struts View Assembly and Validation
(PDF format). * Stephan Wiesner: Learning Jakarta Struts 1.2, Packt Publishing, 2005


External links

* {{Apache Software Foundation Struts 1 Cross-platform free software Free software programmed in Java (programming language) Java enterprise platform Web frameworks Software using the Apache license 2000 software