Web Deployment Descriptor

web-xml
web.xml file is known as Web Application Deployment Descriptor of our application. This file contains all the information needed for the server like servlets and other components like filters or listeners, initialization parameters, container-managed security constraints, resources, welcome pages, session timeout, exception handling mapping etc.

Weclome file mapping :-

welcome-files


Session Timeout mapping :-

Session timeout is used to configure session time out for logged in users in the web application. If use is inactive for specified timeout then his session will be destroyed and he has to login once again to perform any activity.
session-timeout


Servlet mapping :-

Since servlet is class file and it is placed inside the /WEB-INF/classes folder which is a private scope. So in order to expose the servlet to outside the world, it is mapped inside the web.xml file as shown below. .
web-servlet-mapping