Learning About Struts
The official documentation for the framework is provided both
online and as a self-installing WAR in the distribution.
The struts-documentation.war
includes our
- User and Developer Guides,
- Comprehensive Javadocs,
- FAQ and Howto Guides,
- and everything else you find here.
You are invited to preview the documentation online and then install the application locally for closer study.
NOTE: If you are previewing the documentation on the website, most of the links in this section will refer to the Nightly Build. When learning about Struts, be sure to refer to the documentation for the version you are actually using. The documentation is bundled with each distribution as an application that you can install and use locally.The concise Struts User Guide introduces the Model-View-Controller architecture, and how it relates to the major components of Struts. If you want to find out "How Struts works", this is the place to start. Along with an architectural overview, the User Guide also includes detailed installation instructions and release notes for each version of the framework.
Our Developer Guides are detailed technical references to the extensions and components provided in the Struts distribution. Included are package overviews and API reference for each of the Struts taglibs, along with guides to the Struts Utilities and the Struts Validator. The Developer Guides are designed as a day-to-day reference to help you get the most out of the standard packages. Links to the various Developer Guides are provided as part of User Guide menu.
For more detail about a specific class or package, the Struts Javadocs are surprisingly comprehensive and carefully maintained. It is strongly recommended that you refer to the Javadoc for each class as you begin to use it. This will help ensure that important features and options are not overlooked. What you don't know, can't help you.
The Struts FAQs are designed to fill in any small gaps left by the Javadocs or the User and Developer Guides.
- The Kickstart FAQ answers the most common non-technical questions people first ask about Struts.
- The Struts Newbie FAQ answers the most common technical questions asked by first-timer Struts developers.
- The How to Help FAQ answers the most common questions about contributing to the Apache Struts project.
The Howto Guides are designed to help you get started with some of the optional extensions and components available for Struts. These include topics like using the Secure Socket Layer (SSL) protocol with Struts and how to unit test your Struts applications.
The Struts Wiki is a relatively new addition to the Struts documentation. All members of the Struts Community are invited to post comments to the Wiki, as well as the User List. The Wiki is best suited for threads that you think are of lasting importance, while the mailing lists are best suited for incidental questions.
If you have any comments on the pages you see here, they can be posted to the Wiki by following the link on the bottom of any page.
For more help, you might try the JGuru Struts knowledgebase at the JGuru FAQ and Forum.
Of course, the only true documentation is the code itself. If you have any questions about how Struts actually works, do not hesitate to use the source. For the complete, buildable source code to the entire Struts framework, see the "src" folder in your source distribution .
Struts by Example
To help you see how it all fits together, several example applications are bundled with the Struts distribution:
- Blank - A simple template for starting new Struts applications.
- Documentation - The Struts documentation bundle, as seen on the website.
- MailReader - The original Struts example application. Try me first!
- Examples - Various demonstration applications combined as separate modules:
- Exercise-Taglib - A set of test pages that also demonstrate use of the custom tags.
- Tiles-Doc - Extensive demonstration of Tiles extension.
- Upload - Demonstrates using the file upload facilities. (Based on Commons Upload.)
- Validator - Demonstrates using the Validator extension.
These applications are provided as standalone WARs in the binary distribution.
The source code for each application is available under WEB-INF/src
in the binaries and under the
web
package in the source distribution.
There are also many third-party example applications available for study, including these:
- AppFuse - Demonstrates using XDoclet with Struts, along with different security packages and Hibernate for database persistence.
- JPetStore - A streamlined version of the Java Petstore application implemented with Struts and iBATIS database layer.
- LogWeb - A Struts webapp for configuring Log4J at runtime within a servlet container.
Learning More About Struts
The Struts Mailing Lists are a treasure trove of useful, interactive information. The user list tends to carry a high volume, so always check the published documentation and the MAILING LIST ARCHIVE before posting a new question. Like as not, it's already been asked and answered.
If you really can't find the answer to your question in the FAQs or list archive, you can post your query to the Struts User list -- BUT YOU MUST SUBSCRIBE TO THE USER LIST OR THE USER LIST DIGEST BEFORE POSTING.
Please note that the Struts User list enjoys a "casual friday" policy. More off-topic messages are tolerated on Fridays so long as the message is prefixed with the token [FRIDAY]. If you'd rather not be troubled by these postings, please set your mail filter accordingly. Posting [FRIDAY] articles on any other weekday is strongly discouraged. We thank you for your cooperation.
The Struts Wiki is a relatively new addition to our documentation. Any member of the community (that means you!) is invited to post new material to the Wiki. However, the Wiki is not the place to ask incidental questions. All support questions should be directed to the Struts User list or other support forum.
There is also a set of Wiki pages devoted to comments on the documentation. To comment on the documentation, follow the "Comments?" link at the bottom of any page.
The Roadmap page outlines our tentative plans for future development.
Struts Community Resources
Struts has attracted a large and robust community of developers, which have created a vast number of Struts related resources. Several pages on our wiki are devoted to listing Struts resources.
- articles,
- books,
- sample applications,
- training, and more!
Books about Struts
The Apache Software Foundation does not provide printed manuals, but several third-party books about Struts are available. A current list of books about Struts is maintained as a wiki page.
Next: Acquiring Struts