Learning About Struts

The official documentation for the framework is provided online and may be built locally from the source code distribution using Apache Maven 2. To build the documentation, change to the subproject's folder and run

$ mvn site

For more help with building the website, visit the Struts Maintenance - Website page.

Our documentation includes a User Guide,FAQs and Howto Guides, along with this top-level introduction.

The Javadocs and source code can also be browsed.

Documentation Versions

You are invited to preview the documentation online, and then install the documentation bundle 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 the framework, be sure to refer to the documentation for the version you are actually using.

User Guide

Our concise User Guide introduces the Model-View-Controller architecture, and how it relates to the major components of the framework. If you want to find out "How it 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.

FAQS and HOWTOs

Our FAQs and HOWTOs are designed to fill in any gaps left by the Javadocs or User Guide.

  • Our Kickstart FAQ answers the most common non-technical questions people first ask about the framework.
  • Our Newbie FAQ answers the most common technical questions asked developers using the framework for the first-time.

The HOWTO Guides are designed to help you get started with some of the optional extensions and components available for the framework. These include topics like using the Secure Socket Layer (SSL) protocol and how to unit test your applications.

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.

Of course, the only true documentation is the code itself. If you have any questions about how the framework actually works, do not hesitate to use the source. For the complete, buildable source code, see the "src" folder in your source distribution.

Javadocs

For more detail about a specific class or package, our Javadocs are surprisingly comprehensive and carefully maintained. It is strongly recommended that you refer to the Javadocs 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.

Struts by Example

To help you see how it all fits together, several example applications are bundled in the "webapp" folder in the distribution that demonstrate using the framework.

  • Blank - A simple template for starting new applications.
  • Cookbook - See various techniques in action and view the source code in place.
  • Examples - Various demonstration applications combined as separate modules:
    • Exercise - A set of test pages that also demonstrate use of the custom tags.
    • Upload - Demonstrates using the file upload facilities. (Based on Commons Upload.)
    • Validator - Demonstrates using the Validator extension.
  • Faces - Demonstrates the Struts-Faces integration tag library.
  • MailReader - The original Struts example application. Try me first!

There are also many third-party example applications available for study, including these three:

  • AppFuse - Demonstrates using XDoclet with the framework, 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.

Other open source applications built using the framework include:

  • Roller - open source blog server.
  • XPlanner - project planning and tracking tool for eXtreme Programming (XP) teams.

Learning More About Struts

The Apache 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 one of the MAILING LIST ARCHIVES 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 one of the list archives, you can post your query to the Apache Struts User list -- BUT YOU MUST SUBSCRIBE TO THE USER LIST OR THE USER LIST DIGEST BEFORE POSTING.

The Apache Struts Wiki is a relatively new addition to our documentation team. Any Struts user (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.

The Roadmap page outlines our tentative plans for future development.

Community Resources

The framework 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 Apache Struts resources.

For a comprehensive listing of all resources related to Apache Struts, including articles, books, and third-party extensions, for both Struts 1 and Struts 2, visit Struts Central.

Books about Struts

The Apache Software Foundation does not provide printed manuals, but several third-party books about Struts are available. Visit Struts Central or the Apache Bookstore for complete listings.

Next: Roadmap