May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, we will use the Spring web application from the previous recipe. We will compile it with Maven and run it with Tomcat.
Here are the steps to compile and run a Spring web application:
pom.xml, add this boilerplate code under the project XML node. It will allow Maven to generate .war files without requiring a web.xml file:<build>
<finalName>springwebapp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>springwebapp project ...Read now
Unlock full access