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

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com