When we deploy the web application into a web server the container reads the deployment descriptor file. Each servlet created in the web application must be configured into the web.xml file.
To configure the servlet in the web.xml, we should provide the following names:
- Original name
- Logical name
The original name is the fully qualified servlet class name. The logical name will be used by the container as the object name. We can call the logical name as the instance name of the servlet created by the container.
The web container identifies whether the client request is issued to the servlet class by using the url-pattern in the web.xml file.
To configure a servlet in web.xml we need to use the following tags.
The root element of the web.xml file is the <web-app> and the above elements are inside the root element.
Java Tutorial on this website:
For more information on Java, visit the official website :