The web.xml is the web deployment descriptor file of Java Servlet based web applications. It allows you to define, declare and configure the Servlet API based implementations in your web application, such as servlets, filters and listeners.
A deployment descriptor (DD) refers to a configuration file for an artifact that is deployed to some container/engine.
In the Java Platform, Enterprise Edition, a deployment descriptor describes how a component, module or application (such as a web application or enterprise application) should be deployed. It directs a deployment tool to deploy a module or application with specific container options, security settings and describes specific configuration requirements. XML is used for the syntax of these deployment descriptor files.
For web applications, the deployment descriptor must be called web.xml and must reside in the WEB-INF directory in the web application root.
Further Reading: