Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Ready, Set, Go!
Added by ehauser, last edited by Rene Gielen on Mar 16, 2007  (view change)

The Bootstrap tutorial walks through installing the framework and creating a simple application.

Be forewarned that the framework is geared toward professional developers. To create non-trivial applications, a working knowledge of several key technologies is required.
  • Java
  • Filters, JSP, and Tag Libraries
  • JavaBeans
  • HTML and HTTP
  • Web Containers (such as Tomcat)
  • XML

For more about supporting technologies, see the Key Technologies Primer.

In the Ready, Set, Go! lesson, we download the framework and get started on an application of our own.

Download the Distribution

A distribution can be downloaded from the Apache Struts website. The full distribution contains the struts2-core.jar file,related dependencies, example applications, a copy of the documentation in HTML format, and the complete source code.

To compile it yourself, refer to Building the Framework from Source.

Our First Application

To get started with a new application, we can use the blank template, run the Maven archetype, or just setup a web infrastructure from scratch.

Using the Blank Application

The blank web application in the distribution's apps directory is meant as a template. We can make a copy of the "blank.war", deploy it to our container, and use the exploded copy as the basis for our application. There is even a simple batch file in the source code directory that we can use to recompile the application in place.

Run the Maven Archetype

For those of us using Maven as a build system, we can use the Maven Archetype to create a new application.

mvn archetype:create -DgroupId=tutorial \
                       -DartifactId=tutorial \
                       -DarchetypeGroupId=org.apache.struts \
                       -DarchetypeArtifactId=struts2-archetype-starter \
                       -DarchetypeVersion=2.0.5-SNAPSHOT \
                       -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository

The archetype command creates an application template. For more information, see Struts Maven Archetypes

Setting up from scratch

If for some reason the blank template or archetype doesn't work out, it's not so hard to setup a Struts 2 application from scratch. For details, see Simple Setup.

Next Onward to Hello World
Prev Return to Bootstrap