Site icon TestingDocs.com

Deployment Descriptor File (web.xml)

Overview

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.

web.xml

To configure the servlet in the web.xml, we should provide the following names:

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.

Tags

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 Tutorials

Java Tutorial on this website:

https://www.testingdocs.com/java-tutorial/

For more information on Java, visit the official website :

https://www.oracle.com/java/

Exit mobile version