Java Reference
In-Depth Information
The directory structure illustrated in Figure 4-8 follows the normal Maven directory structure.
Table 4-4 describes the directory structure of the HelloWorld application.
Table 4-4. Directory Structure of a Maven-Based Application
Directory
Description
Src
All source
: - main
Main source directory
: : - java
Java source
: : - helloworld
Package defined by the groupID parameter
: : - action
The package from the archetype
: :- resources
Resources(configuration, properties, and so on)
: - webapp
Web application files
: : - WEB-INF
WEB-INF folder
The directory structure of a non-Maven HelloWorld application might look like Table 4-5 .
Table 4-5. Directory Structure of a Non-Maven-Based Application
Directory
Description
Src
All source
: - helloworld
Helloworld package
: - action
Action package
- struts.xml
Resources(configuration, properties, and so on)
Web
Web application files
: - WEB-INF
WEB-INF folder
You need to add the struts 2-core dependency to the generated pom.xml file of the HelloWorld
application. Listing 4-13 shows the code fragment to add to pom.xml .
Listing 4-13. struts 2-core Dependency
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts 2-core</artifactId>
<version>2.3.15.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
 
 
Search WWH ::




Custom Search