The web deployment descriptor XML file is the traditional method for Java web developers to configure Servlets, filters, and listeners in a Java EE application. The file must be named
web.xml, and the specification mandates that it will be found in the WAR file under the folder
The web deployment descriptor describes the Servlet classes, filters, and listeners, the environment and resources, and other configurations of a web application. Putting the information all together, inform the web container how to serve the content from the incoming web requests.
The simplest possible deployment descriptor for Servlet 3.1 and beyond looks just like the following code:
<?xml version = "1.0" encoding = "ISO-8859-1"?> ...