Learn Java for Web Development

(Tina Meador) #1
CHAPTER 4: Building a Web Application Using Struts 2 175

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"



  1. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    3.4.0.0
    4.com.apress
    5.helloworldStruts2
    6.war
    7.0.0.1-SNAPSHOT
    8.helloworldStruts2Maven Webapp
    9.http://maven.apache.org
    10.
    11.
    12.junit
    13.junit
    14.3.8.1
    15.test
    16.

    17.
    18.org.apache.struts
    19.struts2-core
    20.2.3.15.1
    21.jar
    22.compile
    23.

    24.

    25.
    26.helloworldStruts2
    27.





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" >



Archetype Created Web Application
Free download pdf