Deployment Descriptor files

Deployment Descriptor files

Web.xml is clearly a xml file that act as a medium between the developer and a web container. It is also called index of an app or Deployment Descriptor files.
Neither the directory not the name of web.xml can be change because it is set according to name to recognized by container at run-time.
In web.xml file, following things are configured :-
  • Servlet
  • JSP
  • Filter
  • Listeness
  • Welcome files
  • Security
  • ...
Servlet file configuration requires following xml tags
To configure servlet : tag are used. This tag contains servlet tag and container name.
are purposed to map servlet to a specific url.
Sun Microsystem has already define a structure for Web.xml files. So being a developer you will need to follow the structure and configuration of web resources are done according to it.
Three names requires to be added to configure a servlet in Web.xml file
  • Alias name or register name
  • Fully qualified class name
  • url-pattern

Syntax

  • 
    
    alias name
    fully qualified class name
    
    
    alias name
    /url pattern