Table of Contents

About

The web.xml file is the deployment descriptor file for a web application.

It's a J2EE standard XML document that configures the contents of a WAR file.

You can override any of the default servlet parameters at the Web application level by specifying corresponding

elements in the J2EE standard web.xml deployment descriptor.
Articles Related
Example
<web-app>

    <display-name>gerardnico.com</display-name>

    <description>
      gerardnico.com
    </description>

    <welcome-file-list>
       <welcome-file>index.html</welcome-file>
    </welcome-file-list>

</web-app>
Structure
Start Page

The start page for the application is defined with the welcome-file tag.

Example:

<web-app>
...
  <welcome-file>
    myWelcomeFile.jsp
  </welcome-file>
...
</web-app>

It's default value is:

  • name: index,
  • Extension: .html, .htm, or .jsp
Global Parameter (context-param)