The Web deployment descriptor editor includes the following sections:
Web Application Structure
Provides a quick summary of the contents in the Web deployment descriptor and lets you add, remove, or change the contents.
Context parameters
A servlet context defines a server's view of the Web application within which the servlet is running. The context also enables a servlet to access resources available to it.
Using the context, a servlet can log events, obtain URL references to resources, and set and store attributes that other servlets in the context can use. These properties declare a Web application's parameters for its context. They convey setup information, such as a webmaster's e-mail address or the name of a system that holds critical data.
EJB Local Reference
Create a reference to an enterprise bean that is accessed through its local home and local interface.
EJB Reference
Create a reference to an enterprise bean that is accessed through its remote home and remote interface.
Environment Variable
Declare an environment entry for the application.
Error Page
Error page locations enable a servlet to find and serve a URI to a client based on a specified error status code or exception type.
These properties are used if the error handler is another servlet or JSP file. The properties specify a mapping between an error code or exception type and the path of a resource in the Web application. The container examines the list in the order that it is defined, and attempts to match the error condition by status code or by exception class. On the first successful match of the error condition, the container serves back the resource defined in the Location property.
Filter
Defines a filter class and its initialization attributes.
Create a new filter, add an existing filter to the deployment descriptor, or remove the selected filter from the deployment descriptor.
Filter Mapping
Defines the filter mapping to a URL pattern or servlet.
JSP Configuration
Add a resource collection or a tag library.
Listener
Defines an application listener.
Locale Encoding Mapping List
Maps locale name to an encoding name.
Login Configuration
Configures how a user is authenticated. If Login Configuration is specified, the user must authenticate in order to access resources constrained by the Security Constraint parameter.
Message Destination
Specifies the destination of a message-driven bean.
Message Destination Reference
Specifies the Java Naming and Directory Interface (JNDI) name of the J2C administered object to bind the message destination reference to the message-driven beans. Map each message destination reference in your application to an administered object.
MIME Mapping
Defines the mapping between an extension and a mime type.
Persistence Context Reference
Specifies the lifetime of the persistence context.
Persistence Unit Reference
Specifies the persistence.xml file.
Post Construct
Defines the method that is executed after dependency injection initialization.
Pre Destroy
Defines the callback notification that signals that the instance is in the process of being removed by the container.
Resource Environment Reference
Defines the reference of a resource in the web application to an associated administered object.
Resource Reference
Defines the reference of a lookup name to an external resource.
Security Constraint
Security constraints determine how Web content is to be protected. These properties associate security constraints with one or more Web resource collections.
A constraint consists of a Web resource collection, an authorization constraint and a user data constraint.
A Web resource collection is a set of resources (URL patterns) and HTTP methods on those resources. All requests that contain a request path that matches the URL pattern described in the Web resource collection are subject to the constraint. If no HTTP methods are specified, then the security constraint applies to all HTTP methods.
An authorization constraint is a set of roles that users must be granted in order to access the resources described by the Web resource collection. If a user who requests access to a specified URI is not granted at least one of the roles specified in the authorization constraint, the user is denied access to that resource.
A user data constraint indicates that the transport layer of the client or server communications process must satisfy the requirement of either guaranteeing content integrity (preventing tampering in transit) or guaranteeing confidentiality (preventing reading while in transit).
Security Role
Defines security roles.
Security Reference
Defines a reference to a security role to an alternate role name.
Servlet
Create a new servlet, add an existing servlet or JSP file to the deployment descriptor, or remove the selected servlet of JSP file from the deployment descriptor.
Welcome File List
Configures an ordered list of default web pages that are served when a file is not found.
A Welcome file is an entry point file (for example, index.html) for a group of related HTML files.
Welcome files are located by using a group of partial URIs. The Web container uses the partial URIs to find a valid file when the initial URI is not found.
Source
Edit the web.xml source directly.
Although you can edit web.xml directly, we recommend that you edit the sections in the Web Deployment Descriptor editor. As you specify deployment information in these sections, the editor automatically incorporates the appropriate XML tagging in web.xml.
In addition to the configuration information in the web.xml file, other deployment descriptors in a Web project include the following information:
Binding information
Information is required by the application server to bind the deployment information specified in the application to a specific instance. For example, it may map a logical name of an external dependency or resource to the actual physical JNDI name of the resource. It also may map security role information to a set of groups or users.
IBM® binding and extensions information (ibm-web-bnd.xml and ibm-web-ext.xml files)
Additions to the standard descriptors for J2EE applications, Web applications, and enterprise beans. The extensions enable Enterprise Edition or legacy (older) systems to work in the current WebSphere® Application Server environment. They are also used to specify application behavior that is vendor-specific, undefined in a current specification, or expected to be included in a future specification.
If you import a WAR file into an existing Web project, you can include the deployment descriptor files included in the WAR file as the Web project's new deployment descriptor. Any specific deployment information already defined in these files is used when deploying the updated Web application.
The web.xml file can be updated automatically to reflect changes to your Web project. For instance, when you use the New Servlet wizard to create a new servlet in a Web project, the wizard places the appropriate servlet entry into the web.xml file.