Java Reference
In-Depth Information
Your pom.xml file will look like Listing 4-14.
Listing 4-14. pom.xml
1.<project xmlns=" http://maven.apache.org/POM/4.0.0 "
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "
2. xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd " >
3.<modelVersion>4.0.0</modelVersion>
4.<groupId>com.apress</groupId>
5.<artifactId>helloworldStruts2</artifactId>
6.<packaging>war</packaging>
7.<version>0.0.1-SNAPSHOT</version>
8.<name>helloworldStruts2Maven Webapp</name>
9.<url> http://maven.apache.org</url >
10.<dependencies>
11.<dependency>
12.<groupId>junit</groupId>
13.<artifactId>junit</artifactId>
14.<version>3.8.1</version>
15.<scope>test</scope>
16.</dependency>
17.<dependency>
18.<groupId>org.apache.struts</groupId>
19.<artifactId>struts2-core</artifactId>
20.<version>2.3.15.1</version>
21.<type>jar</type>
22.<scope>compile</scope>
23.</dependency>
24.</dependencies>
25.<build>
26.<finalName>helloworldStruts2</finalName>
27.</build>
28. </project>
Note You can find the list of dependencies of Struts 2 at
http://struts.apache.org/development/2.x/struts2-core/dependencies.html .
Listing 4-15 shows the empty deployment descriptor created in the project.
Listing 4-15. web.xml
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
" http://java.sun.com/dtd/web-app_2_3.dtd " >
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>
 
 
Search WWH ::




Custom Search