Versions Compared

Key

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

The Bootstrap tutorial will help you get up and running with the framework by walking walks through installing the framework and creating a simple application.

...

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

Tip

If you'd like to To compile it yourself, please refer to Building the Framework from Source.

...

Our First Application

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

...

The blank web application in the distribution's apps directory is meant as a template. Make We can make a copy of the "blank.war", deploy it to your our container, and use the exploded copy as the basis for your applicationour 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

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

Code Block
mvn archetype:create -DgroupId=tutorial \
                       -DartifactId=tutorial \
                       -DarchetypeGroupId=org.apache.struts \
                       -DarchetypeArtifactId=struts2-archetype-starter \
                       -DarchetypeVersion=2.0.1-SNAPSHOT \
                       -DremoteRepositories=http://people.apache.org/maven-snapshot-repository

This will create a The archetype command creates an application template. For more information, see Struts Maven Archetype

...

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

Next

Onward to Hello World

Prev

Return to Bootstrap