web.xml
. web.xml files are called as Deployment Descriptor files that are used for servlets configurations as web.xml helps in:pom.xml
and index.jsp
file that has the following codes by default.
pom.xml
[xml]
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sample.webproject</groupId>
<artifactId>WebApplication</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>WebApplication Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>WebApplication</finalName>
</build>
</project>
[/xml]
index.jsp
[c]
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
[/c]