Preface
Struts 2 is a popular, easy-to-use MVC framework. This tutorial will help you get started with the framework, even if you are not an experienced Java web application developer. The tutorial will walk you The Bootstrap tutorial walks through installing the framework and creating a simple application.
Note |
---|
...
While the framework is |
...
simple to use, creating non-trivial applications |
...
assumes a working knowledge of |
...
Panel | |
---|---|
title | Supporting Technologiesmany JEE technologies, including:
|
For more about supporting technologies, see the Key Technologies Primer.
In this 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 form 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 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. Make We can make a copy of the "blank.war", deploy it to our container, and use the exploded copy as the basis for your application.
Run the Maven Archetype
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 Struts 2 Maven Archetypes page. TODO
Setting up from scratch
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 Step by Step Bootstrap |