当先锋百科网

首页 1 2 3 4 5 6 7
 The following sections describe the application.xml file. The application.xml file is the deployment descriptor for an Enterprise application. The file is located in the META-INF subdirectory of the application archive. It must begin with the following DOCTYPE declaration:
<!DOCTYPE application PUBLIC "-//Sun Microsystems, 
Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">

application

The application element is the root element of the application deployment descriptor. The elements within the application element are described in the following sections.

The following table describes the elements you can define within the application element.

icon

The following table describes the elements you can define within an icon element.

module

The following table describes the elements you can define within a module element.

Element

Required
Optional

Description

<alt-dd>

Optional

Specifies an optional URI to the post-assembly version of the deployment descriptor file for a particular J2EE module. The URI must specify the full pathname of the deployment descriptor file relative to the application's root directory. If you do not specify alt-dd, the deployer must read the deployment descriptor from the default location and file name required by the respective module specification. You can specify an alternate deployment descriptor only for the J2EE deployment descriptors, web.xml and ejb-jar.xml. You cannot specify alternate descriptor files for the weblogic.xml or weblogic-ejb-jar.xml.

<connector>

Required

Specifies the URI of a resource adapter (connector) archive file, relative to the top level of the application package.

<ejb>

Required

Defines an EJB module in the application file. Contains the path to an EJB JAR file in the application.

Example:

<ejb>petStore_EJB.jar</ejb>

<java>

Required

Defines a client application module in the application file.

Example:

<java>client_app.jar</java>

<web>

Required

Defines a Web application module in the application.xml file. The web element contains a web-uri element and a context-root element. If you do not declare a value for the context-root, then the basename of the web-uri element is used as the context path of the Web application. (Note that the context path must be unique in a given Web server. More than one Web application may be using the same Web server, so you must avoid context path clashes across multiple applications.)

web-uri

Defines the location of a Web module in the application.xml file. This is the name of the WAR file.

context-root

Specifies a context root for the Web application.

Example:

<web>
  <web-uri>petStore.war</web-uri>
  <context-root>estore</context-root>
</web>

security-role

The following table describes the elements you can define within a security-role element.