TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Java Servlets

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:

  • Original name
  • Logical name
  • url-pattern

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.

  • <servlet>
  • <servlet-mapping>

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/

Related Posts

Java Servlets /

JSP Architecture

Java Servlets /

Java ServletRequest Interface

Model View Controller

Java Servlets /

Model View Controller( MVC )

Java Servlets /

GenericServlet Class

Java Servlet Architecture

Java Servlets /

Java Servlet Architecture

‹ GenericServlet Class› Model View Controller( MVC )

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com