Versions Compared

Key

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

Excerpt

The Struts 2 Blank Archetype ("blank-archetype") provides a minimal, but complete, Struts 2 application. It demonstrates some of the most basic Struts 2 concepts, including:

  • XML-based configuration, demonstrates including additional config file
  • Example actions
  • Package-level resource bundle
  • XML-based validation
  • Unit-testing

Table of Contents
minLevel2
maxLevel3
outlinetrue
indent1em
stylenone

Creating Our blank-archetype Project

...

The source code structure follows the normal Maven directory structure. Blank-archetype does not include all of these directories. Our project's structure looks like this:

Directory

Description

src

All project source goes here.

|-main

The primary source directory.

|---java

Java source code

|-----tutorial

Package defined by groupId parameter

|-------example

The example actions from the archetype

|---resources

Resources (config, property, and validation files, and so on

|-----tutorial

Package defined by groupId parameter

|-------example

Example property and validation files from archetype

|---webapp

Web application files (HTML, JSP, etc.)

|-----WEB-INF

Typical WEB-INF folder

|-----example

Files from archetype

|-test

Test code (unit tests etc.)

|---java

Java-based test code

|-----tutorial

Package defined by groupId parameter

`-------example

Test code from archetype