Apache Struts 1: Difference between revisions
m Intro: extensions = extending? |
Jmartinlll (talk | contribs) Splitting again (see talk page) |
||
Line 1: | Line 1: | ||
{{dablink|Struts redirects here. For the structural component, see [[Strut]]. For other uses, see [[Strut (disambiguation)]].}} |
|||
{{More footnotes|date=April 2009}} |
{{More footnotes|date=April 2009}} |
||
{{Infobox |
{{Infobox software |
||
| name = Apache Struts |
| name = Apache Struts |
||
| logo = [[File:Struts logo.gif|frameless|Apache Struts Logo]] |
| logo = [[File:Struts logo.gif|frameless|Apache Struts Logo]] |
||
| |
| author = [[Craig McClanahan]] |
||
| |
| developer = [[Apache Software Foundation]] |
||
| |
| released = {{Start date|2000|05}} |
||
⚫ | |||
| collapsetext = |
|||
⚫ | |||
| caption = |
|||
⚫ | |||
| url = {{URL|http://struts.apache.org/}} |
|||
⚫ | |||
| slogan = |
|||
| |
| operating system = [[Cross-platform]] |
||
| |
| programming language = [[Java (programming language)|Java]] |
||
⚫ | |||
| registration = none |
|||
| |
| license = [[Apache License]] 2.0 |
||
| |
| website = {{URL|http://struts.apache.org/development/1.x/}} |
||
| content_license = |
|||
| owner = Open source |
|||
| author = |
|||
| editor = Anonymous |
|||
| launch_date = {{Start date|2000|05}} |
|||
| alexa = |
|||
| revenue = |
|||
| current_status = Active |
|||
| footnotes = |
|||
}} |
}} |
||
⚫ | '''Apache Struts''' was an [[open-source]] [[web application framework]] for developing [[Java EE]] [[web application]]s. It uses and extends the [[Java Servlet]] [[application programming interface|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. |
||
⚫ | '''Apache Struts''' |
||
== Design goals and overview == |
== Design goals and overview == |
||
Line 37: | Line 28: | ||
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 to read and write the content of these beans from the presentation layer without the need for any embedded Java code. |
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 to read and write the content of these beans from the presentation layer without the need for any embedded Java code. |
||
Struts is categorized as a [[Model 2]] request-based web application framework. |
Struts is categorized as a [[Model 2]] request-based web application framework.<ref>{{cite web|first = Tony|last = Shan|year = 2006|accessdate = 2010-10-10|url = http://portal.acm.org/citation.cfm?id=1190953|title = Taxonomy of Java Web Application Frameworks|publisher = Proceedings of 2006 IEEE International Conference on e-Business Engineering (ICEBE 2006)}}</ref> |
||
Struts also supports [[Internationalization and localization|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. |
Struts also supports [[Internationalization and localization|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. |
||
== Struts 1 == |
|||
{{Infobox software |
|||
| name = Struts 1 |
|||
| logo = |
|||
| author = [[Craig McClanahan]] |
|||
| developer = [[Apache Software Foundation]] |
|||
| released = {{Start date|2000|03}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
| operating system = [[Cross-platform]] |
|||
| programming language = [[Java (programming language)|Java]] |
|||
⚫ | |||
| license = [[Apache License]] 2.0 |
|||
| website = {{URL|http://struts.apache.org/1.x/}} |
|||
}} |
|||
Struts was originally created by [[Craig McClanahan]] and donated to the [[Apache Foundation]] in March, 2000<ref name="strutsModel2"/> where it became a part of the Jakarta project. |
|||
== Struts 2 == |
|||
{{Infobox software |
|||
| name = Struts 2 |
|||
| logo = |
|||
| developer = [[Apache Software Foundation]] |
|||
| released = {{Start date|2006|10|10}} |
|||
| latest release version = 2.3.16 GA |
|||
| latest release date = {{release date|2013|12|08}} |
|||
| operating system = [[Cross-platform]] |
|||
| programming language = [[Java (programming language)|Java]] |
|||
| platform = [[Cross-platform]] ([[Java Virtual Machine|JVM]]) |
|||
| license = [[Apache License]] 2.0 |
|||
| website = {{URL|http://struts.apache.org/2.x/}} |
|||
}} |
|||
{{see also|WebWork}} |
|||
⚫ | 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. |
||
It features: |
|||
* Simple [[Plain Old Java Object|POJO]]-based actions |
|||
* Simplified testability |
|||
* Thread safe |
|||
* [[Ajax (programming)|AJAX]] support |
|||
** [[jQuery]] plugin |
|||
** [[Dojo Toolkit]] plugin (deprecated) |
|||
** Ajax client-side validation |
|||
* Template support |
|||
* Support for different result types |
|||
* Easy to extend with plugins |
|||
** [[Representational state transfer|REST]] plugin (REST-based actions, extension-less URLs) |
|||
** Convention plugin (action configuration via Conventions and Annotations) |
|||
** Spring plugin ([[dependency injection]]) |
|||
** [[Hibernate (Java)|Hibernate]] plugin |
|||
** Support in design |
|||
** JFreechart plugin (charts) |
|||
** [[jQuery]] plugin (Ajax support, UI widgets, dynamic table, charts) |
|||
** Rome plugin |
|||
**plugin |
|||
== See also == |
== See also == |
||
[[Comparison of web application frameworks]] |
|||
== References == |
== References == |
||
Line 118: | Line 52: | ||
== External links == |
== External links == |
||
* {{Official website|http://struts.apache.org/}} |
* {{Official website|http://struts.apache.org/development/1.x/}} |
||
* [http://cwiki.apache.org/S2PLUGINS/home.html Struts 2 Plugin Registry] |
|||
* [http://code.google.com/p/struts2-jquery/ Struts2 jQuery Plugin] |
|||
* [http://www.mastertheboss.com/web-interfaces/190-jboss-struts-tutorial.html Struts tutorial on JBoss] |
|||
* [http://www.digitalsanctum.com/2010/01/25/how-to-test-struts-2-actions-without-a-container/ How to Test Struts 2 Actions Without a Container] |
|||
* [http://www.javatips.net/blog/2013/07/struts-2-example/ Struts 2 Example] |
|||
* [http://www.javatips.net/blog/2013/07/struts-2-validation-example/ Struts 2 Validation Example] |
|||
* [http://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-6117/Apache-Struts.html Apache Struts Vulnerabilities] |
|||
* [http://www.javabeat.net/2007/05/struts-2-0-introduction-and-validations-using-annotations/ Struts 2.0 Validations] |
|||
{{Apache}} |
|||
{{Application frameworks}} |
{{Application frameworks}} |
||
{{apache}} |
|||
{{Java (software platform)}} |
|||
[[Category:Apache Software Foundation|Struts]] |
[[Category:Apache Software Foundation|Struts]] |
Revision as of 09:48, 12 March 2014
This article includes a list of general references, but it lacks sufficient corresponding inline citations. (April 2009) |
Original author(s) | Craig McClanahan |
---|---|
Developer(s) | Apache Software Foundation |
Initial release | May 2000 |
Stable release | 1.3.10
/ December 8, 2008 |
Repository | |
Written in | Java |
Operating system | Cross-platform |
Platform | Cross-platform (JVM) |
License | Apache License 2.0 |
Website | struts |
Apache Struts was 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. 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 to read and write the content of these beans from the presentation layer 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
Comparison of web application frameworks
References
- ^ Apache Struts 1 EOL Press Release
- ^ Apache Struts 1 EOL Announcement
- ^ Shan, Tony (2006). "Taxonomy of Java Web Application Frameworks". Proceedings of 2006 IEEE International Conference on e-Business Engineering (ICEBE 2006). Retrieved 2010-10-10.
Bibliography
- James Holmes: Struts: The Complete Reference, McGraw-Hill Osborne Media, ISBN 0-07-223131-9
- Bill Dudney and Jonathan Lehr: Jakarta Pitfalls, Wiley, ISBN 978-0-471-44915-7
- Bill Siggelkow: Jakarta Struts Cookbook, O'Reilly, ISBN 0-596-00771-X
- James Goodwill, Richard Hightower: Professional Jakarta Struts, Wrox Press, ISBN 0-7645-4437-3
- John Carnell and Rob Harrop: Pro Jakarta Struts, Second Edition, Apress, ISBN 1-59059-228-X
- John Carnell, Jeff Linwood and Maciej Zawadzki: Professional Struts Applications: Building Web Sites with Struts, ObjectRelationalBridge, Lucene, and Velocity, Apress, ISBN 1-59059-255-7
- Ted Husted, etc.: Struts in Action, Manning Publications Company, ISBN 1-930110-50-2
- Struts View Assembly and Validation, (PDF format).
- Stephan Wiesner: Learning Jakarta Struts 1.2, Packt Publishing, 2005 ISBN 1-904811-54-X