Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


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 Ready, Set, Go!准备,设置,开始使用.

Our First Application

To get started with a new application, we can use the blank template, run the Maven archetype, or set up 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.

For directions on using the Struts 2 archetypes see the Ready, Set, Go!准备,设置,开始使用 page.

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 Ready, Set, Go!准备,设置,开始使用.