Photo:1 Photo:2 Photo:3 Photo:4 |
| Design goals and overview | |
| 2>
In a standard Java EE web application, the client will typically submit information to the server via a web form. The information is then either handed over to a Java Servlet that processes it, 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 request-based web application framework.[1]
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, and content components.
[edit] Tags:Java,Web Application Framework,Java Ee,Java Servlet,Edit,Web Form,Html,Javaserver Pages,Xml,Xslt,Velocity,Javabeans,Internationalization,Ode,Roller,Read, | |
| Struts2 features | |
| 2>
Simple POJO based Actions
Simplified testability
Thread Safe
AJAX Support
jQuery Plugin
Dojo Plugin (deprecated)
AJAX Client Side Validation
Template Support
Support for different result types
Easy to extend with Plugins
REST Plugin (REST based Actions, Extension-less URLs)
Convention Plugin (Action Configuration via Conventions and Annotations)
Spring Plugin (Dependency Injection)
Hibernate Plugin
support in Design
JFreechart Plugin (Charts)
jQuery Plugin (AJAX Support, UI Widgets, Dynamic Table, Charts)
Rome Plugin (RSS Feeds)
[edit] Tags:Type,Pojo,Ajax,Rest,Dependency Injection,Jquery, | |
| Competing MVC frameworks | |
| 2>
Although Struts is a well-documented, mature, and popular framework for building front ends to Java applications, there are other frameworks categorized as "lightweight" MVC frameworks such as Spring MVC, Stripes, Wicket, Play!, and Tapestry. The new XForms standards and frameworks may also be another option to building complex web Form validations with Struts in the future.
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 Struts2, which reached its first full release in February 2007.
In 2004, Sun launched an addition to the Java platform, called JavaServer Faces (JSF). Aside from the original Struts framework, the Apache project previously offered a JSF-based framework called Shale, which was retired in May 2009.[2]
Other MVC frameworks that are Java based include WebObjects and Grails.
[edit] Tags:Mvc,Spring Mvc,Stripes,Wicket,Play!,Tapestry,Xforms,Webwork,Javaserver Faces,Shale,Webobjects,Grails,Play,Ace, | |
| See also | |
| 2>
Model-view-controller
Jakarta Project
Java EE
JavaServer Faces
Stripes
Comparison of web application frameworks
ZK Framework
[edit] Tags:Model-view-controller,Jakarta Project,Comparison Of Web Application Frameworks,Zk Framework,Web Application Frameworks,Zk, | |
| References | |
| 2>
^ Shan, Tony (2006). "Taxonomy of Java Web Application Frameworks". Proceedings of 2006 IEEE International Conference on e-Business Engineering (ICEBE 2006). http://portal.acm.org/citation.cfm?id=1190953. Retrieved 2010-10-10.
^ http://shale.apache.org/
[edit] Tags: | |
| Bibliography | |
| 2>
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
[edit] Tags:James Holmes,Isbn 0-07-223131-9,Isbn 978-0-471-44915-7,Bill Siggelkow,Isbn 0-596-00771-x,James Goodwill,Richard Hightower,Wrox Press,Isbn 0-7645-4437-3,Rob Harrop,Isbn 1-59059-228-x,Jeff Linwood,Maciej Zawadzki,Isbn 1-59059-255-7,Ted Husted,Isbn 1-904811-54-x,Apr,James,Lucene, | |
| External links | |
| 2>
Official website
Struts 2 Plugin Registry
Struts2 jQuery Plugin
Struts2 Tutorial
Struts tutorial on JBoss
How to Test Struts 2 Actions Without a Container
v
d
e
Web application frameworks
ASP.NET
ASP.NET MVC
ASP.NET Web Forms
ASP.NET Dynamic Data
BFC
DotNetNuke
MonoRail
OpenRasta
Umbraco
ColdFusion
ColdSpring
Fusebox
Mach-II
Model-Glue
onTap
on Wheels
Common Lisp
CL-HTTP
SymbolicWeb
UnCommon Web
Weblocks
C++
CppCMS
Wt
Java
Apache Struts
AppFuse
Flexive
GWT
Grails
Vaadin
ItsNat
JavaServer Faces
Jspx
Makumba
OpenXava
Play
Eclipse RAP
Reasonable Server Faces
RIFE
Seam
Spring
Stripes
Tapestry
WebWork
Wicket
ZK
ICEfaces
WaveMaker
JavaScript
Ample SDK
Prototype JavaScript Framework
Rico
script.aculo.us
SproutCore
jQuery
Dojo Toolkit
Perl
Catalyst
Interchange
Mason
Maypole
WebGUI
Dancer
PHP
phpTransformer
AppFlower
CakePHP
CodeIgniter
Drupal
e107
Horde
Joomla!
Lithium
Midgard
MODx
Qcodo
Seagull
SilverStripe
Symfony
TYPO3
Xaraya
Yii
Zend Framework
Zeta Components
Python
Django
Flask
Nevow
TurboGears
Plone
Pyjamas
Pylons
web2py
Zope
Tornado
Ruby
Ruby on Rails
Merb
Sinatra
Hobo
Camping
Nitro
Ramaze
Smalltalk
AIDA/Web
Seaside
Other languages
Application Express (PL/SQL)
Fusebox (ColdFusion and PHP)
HAppS (Haskell)
Kepler (Lua)
Lift (Scala)
OpenACS (Tcl)
SproutCore (JavaScript/Ruby)
Yaws (Erlang)
v
d
e
Apache Software Foundation
Top level projects
Abdera
ActiveMQ
Ant
Aries
Apache HTTP Server
APR
Avro
Axis
Buildr
Camel
Cassandra
Cayenne
Chemistry
Click
Cocoon
Continuum
CouchDB
CXF
Derby
Directory
Felix
Forrest
Geronimo
Gump
Hadoop
Hive
HBase
Jackrabbit
James
Karaf
Lenya
Lucene
libcloud
Mahout
Maven
MINA
mod_perl
MyFaces
ODE
OFBiz
OpenEJB
OpenJPA
POI
Pivot
Qpid
River
Roller
ServiceMix
Shindig
Shiro
Sling
SpamAssassin
stdcxx
Struts
Subversion
Tapestry
Thrift
Tomcat
Trafficserver
Tuscany
UIMA
Velocity
Wicket
Xerces
XMLBeans
Jakarta Projects
BCEL
BSF
Cactus
JMeter
Commons Projects
Daemon
Sanselan
Jelly
Lucene Projects
Lucene Java
Droids
Lucene.Net
Lucy
Nutch
Open Relevance Project
PyLucene
Solr
Tika
Hadoop Projects
HDFS
ZooKeeper
Other projects
Chainsaw
Batik
FOP
Log4j
XAP
Log4Net
Ivy
Wink
Incubator Projects
ACE
Callback
Composer
Empire-db
Hama
JSPWiki
OpenOffice.org
XAP
Wave
Wink
Apache Attic
AxKit
Beehive
Bluesky
Excalibur
Harmony
HiveMind
Slide
Shale
iBATIS
License: Apache License
Website: apache.org
Retrieved from "http://en.wikipedia.org/w/index.php?title=Apache_Struts&oldid=472391995"
Categories: Apache Software FoundationFree cross-platform softwareFree software programmed in JavaJava enterprise platformWeb application frameworksHidden categories: Articles lacking in-text citations from April 2009All articles lacking in-text citations
Personal tools
Log in / create account
Namespaces
Article
Talk
Variants
Views
Read
Edit
View history
Actions
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Toolbox
What links here
Related changes
Upload file
Special pages
Permanent link
Cite this page
Print/export
Create a bookDownload as PDFPrintable version
Languages
العربية
Català
Česky
Deutsch
Español
Français
한국어
Italiano
Bahasa Melayu
Nederlands
日本語
Polski
Português
Русский
Svenska
தமிழ்
తెలుగు
Українська
Tiếng Việt
中文
This page was last modified on 21 January 2012 at 06:59.
Text is available under the Creative Commons Attribution-ShareAlike License;
additional terms may apply.
See Terms of use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.Contact us
Privacy policy
About Wikipedia
Disclaimers
Mobile view
if ( window.isMSIE55 ) fixalpha();
if ( window.mediaWiki ) {
mw.loader.load(["mediawiki.user", "mediawiki.util", "mediawiki.page.ready", "mediawiki.legacy.wikibits", "mediawiki.legacy.ajax", "mediawiki.legacy.mwsuggest", "ext.gadget.wmfFR2011Style", "ext.vector.collapsibleNav", "ext.vector.collapsibleTabs", "ext.vector.editWarning", "ext.vector.simpleSearch", "ext.UserBuckets", "ext.articleFeedback.startup", "ext.articleFeedbackv5.startup", "ext.markAsHelpful"]);
}
if ( window.mediaWiki ) {
mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"highlightbroken":1,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":false,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":4,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":0,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,
"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"flaggedrevssimpleui":1,"flaggedrevsstable":0,"flaggedrevseditdiffs":true,"flaggedrevsviewdiffs":false,"vector-simplesearch":1,"useeditwarning":1,"vector-collapsiblenav":1,"usebetatoolbar":1,"usebetatoolbar-cgd":1,"wikilove-enabled":1,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"searchNs100":false,"searchNs101":false,"searchNs108":false,"searchNs109":false,"gadget-wmfFR2011Style":1});;mw.user.tokens.set({"editToken":"+\\","watchToken":false});;mw.loader.state({"user.options":"ready","user.tokens":"ready"});
/* cache key: enwiki:resourceloader:filter:minify-js:4:b41a86ec4e0fe8329bc3ce917e792339 */
}
Tags:Apache Software Foundation,Cross-platform,License,Asp.net,Asp.net Mvc,Asp.net Web Forms,Asp.net Dynamic Data,Bfc,Dotnetnuke,Monorail,Openrasta,Umbraco,Coldfusion,Coldspring,Fusebox,Mach-ii,Model-glue,Ontap,On Wheels,Common Lisp,Cl-http,Symbolicweb,Uncommon Web,Weblocks,C++,Cppcms,Wt,Appfuse,Flexive,Gwt,Vaadin,Itsnat,Jspx,Makumba,Openxava,Eclipse Rap,Reasonable Server Faces,Rife,Seam,Icefaces,Wavemaker,Javascript,Ample Sdk,Prototype Javascript Framework,Rico,Script.aculo.us,Sproutcore,Dojo Toolkit,Perl,Catalyst,Interchange,Mason,Maypole,Webgui,Dancer,Php,Phptransformer,Appflower,Cakephp,Codeigniter,Drupal,E107,Horde,Joomla!,Lithium,Midgard,Modx,Qcodo,Seagull,Silverstripe,Symfony,Typo3,Xaraya,Yii,Zend Framework,Zeta Components,Python,Django,Flask,Nevow,Turbogears,Plone,Pyjamas,Pylons,Web2py,Zope,Tornado,Ruby,Ruby On Rails,Merb,Sinatra,Hobo,Camping,Nitro,Ramaze,Smalltalk,Aida/web,Seaside,Application Express,Pl/sql,Happs,Haskell,Kepler,Lua,Lift,Scala, | |
zote monety |