Deployment Descriptor
Encyclopedia
A deployment descriptor refers to a configuration file
Configuration file
In computing, configuration files, or config files configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII and line-oriented, with lines terminated by a newline or carriage...

 for an artifact that is deployed to some container
Web container
Web container is the component of a web server that interacts with the servlets. A web container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights...

/engine.

In the Java Platform, Enterprise Edition
Java Platform, Enterprise Edition
Java Platform, Enterprise Edition or Java EE is widely used platform for server programming in the Java programming language. The Java platform differs from the Java Standard Edition Platform in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier...

, a deployment descriptor describes how a component, module or application (such as a web application
Web application
A web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is coded in a browser-supported language and reliant on a common web browser to render the application executable.Web applications are...

 or enterprise application) should be deployed. It directs a deployment tool to deploy a module or application with specific container options, security settings and describes specific configuration requirements. XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 is used for the syntax of these deployment descriptor files.

For web applications, the deployment descriptor must be called web.xml and must reside in the WEB-INF directory in the web application root. For Java EE applications, the deployment descriptor must be named application.xml and must be placed directly in the META-INF directory at the top level of the application .ear file
EAR (file format)
EAR is a file format used by Java EE for packaging one or more modules into a single archive so that the deployment of the various modules onto an application server happens simultaneously and coherently...

.

Types of Deployment Descriptor

In Java EE, there are two types of deployment descriptors: "Java EE deployment descriptors" and "runtime deployment descriptors". The Java EE deployment descriptors are defined by the language specification, whereas the runtime descriptors are defined by the vendor of each container implementation. For example, the web.xml file is a standard Java EE deployment descriptor, specified in the Java Servlet
Java Servlet
A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers...

 specification, but the sun-web.xml file contains configuration data specific to the Sun GlassFish Enterprise Server implementation. In addition to that there are other types of descriptors as well.

External links

  • http://java.sun.com/javaee/reference/glossary/
  • http://java.sun.com/xml/ns/javaee/index.html - Deployment Descriptor XML Schema Reference
  • http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/deployment/deployment5.html
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK