There are several resources available to help you create your own applications, including QuickStart and the various example applications.
Browse the Resources
There are online resources to help you along, every step of the way.
- Download the framework - download the framework distribution
- Join the Forums - The forums are full of active developers, contributors, and power users - often even available for chat. This is the best and quickest way to get a question answered.
- Subscribe to Mailing List and post a question, or browse Mail Archive. (You probably want to browse the archive or forum first. All posts from the forum are posted to the mailing lists, and vice versa.
- Subversion Repository - Browse the source.
- Confluence Wiki - Read it here first! The project documentation is created on the wiki and then posted as HTML to the website.
- JIRA Issue Tracker - Browse or file enhancements requests and defect reports.
- Apache Struts Home
Distribution Quickstart
The distribution contains all the documentations, sources, and binaries, you need to get started on your application.
dist/ docs/ lib/ src/ src/java/template/ webapps/ README.txt pom.xml struts2-core-(VERSION).jar struts2-core-(VERSION).zip struts2-core-(VERSION)-src.jar
The docs
directory contains the current Javadocs, the full user documentation including the document you are reading, and taglib documentation, as well as Clover, JUnit and dependency reports for the build.
The dist
directory contains framework files with different packaging:
- struts-nostatic-<version>.jar: containing only the framework without the static content
- struts-static-<version>.zip: containing the required framework static dependencies
The lib
directory contains the required as well as optional dependencies for the framework, organized in subdirectories to represent different optional configurations:
lib/ ajax bootstrap build cewolf default fileupload fileupload-cos fileupload-pell jfree pico plexus portlet quickstart sitemesh source spring tiger tiles velocity xslt
Note that none of the optional packages are required to use the framework. If you wish to use certain features such as JasperReports or Java 5 (Tiger) generics and annotation support, then you must include the optional packages.
The framework also comes packaged with all the source files and templates for the JSP tags.
Running the Examples
Several example applications come bundled with the distribution that demonstrate many common use cases. You can run these using the QuickStart feature or in your own web container.
Running with QuickStart
The framework provides a slick way to jump into web development called QuickStart. Essentally, QuickStart is combination of technologies and conventions. The key feature is the ability to run web applications "out of the box" with a stripped-down Jetty container.
With QuickStart, running the demos is as easy as can be. You just need to run:
> java -jar webwork.jar quickstart:<application-name>
from the distribution's top directory, where <application-name>
is one of the subdirectory names under webapps/
. Each subdirectoy hosts a demo application.
If you want to start the shopping-cart webapp, the startup command would be:
> java -jar webwork.jar quickstart:showcase
One the application starts up, point your browser to http://localhost:8080/showcase/
, and you should be ready to go.
Several example appliations are included in the distribution.
blank |
Not really an example application, but a blank web application template to use as the base for your own applications |
---|---|
mailreader |
The infamous Struts MailReader application. |
portlet |
Demonstration of our porlet integration (to be deployed in a Portal Server) - see the Portlet Tutorial to read more about portlets |
shopping-cart |
Simple example application demonstrating various aspects of the framework |
showcase |
Extensive demonstration of all tag and AJAX features, along with other examples |
starter |
Basic web application that you can use as a starting point for experimenting with framework features - one could almost call it a "playground" application |
You can review the QuickStart documentation to learn more about how it works and how you can utilize QuickStart with your own applications.
To Quickstart or not to Quickstart?
Quickstart is a handy tool for development of your applications. We recommend that you give QuickStart a try, to see if it meets your development needs. However, QuickStart is not meant to be your sole environment for web application development. QuickStart is meant to help you rapidily create proof-of-concepts and so that you can see the result. We recommend you always at least test your work under other applications servers, such as Tomcat, Resin, or even the standard, standalone version of Jetty.