Web 3.0 Modules: The web Deployment Descriptor editor
Web 3.0 web projects do not require a web.xml file since deployment information is managed by annotations. If a web deployment descriptor is required for your web 3.0 web project, right-click your project and select
.The web.xml file for a web project provides information necessary for deploying a web application module. It is used in building a WAR file from a project.
The web deployment descriptor editor is dynamic and includes many sections that represent various properties and settings in the deployment descriptor.

- Web Application Structure
- Provides a quick summary of the contents in the web deployment descriptor and allows you add, remove, or change the contents.
- Absolute Ordering
- Use absolute ordering to force an order for scanning web fragments or scan a subset of the web fragments.
- 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 email address or the name of a system that holds critical data.
- Data source
- Configure data source information to make the data source available to the application.
- 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 that is defined in the Location property.
- Filter
- Defines a filter class and its initialization attributes.
- Creates a new filter, adds an existing filter to the deployment descriptor, or removes 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 that are 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 run after dependency injection initialization.
- Pre Destroy
- Defines the callback notification that signals that the instance is being removed by the container.
- Resource Environment Reference
- Defines the reference of a resource in the web application to an associated an 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 that is 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 that are 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 that are 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
- Creates a new servlet, adds an existing servlet or JSP file to the deployment descriptor, or removes the selected servlet of JSP file from the deployment descriptor.
- Session Configuration
- Defines session attributes for the web application.
- 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.
Edit the web.xml file by using the multiple tabbed pages in the web Deployment Descriptor editor. As you specify deployment information, the editor automatically incorporates the appropriate XML tagging in web.xml.
- Binding information
- Information is required by the application server to bind the deployment information that is specified in the application to a specific instance. For example, it can map a logical name of an external dependency or resource to the actual physical JNDI name of the resource. It also can 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 Java EE applications, web applications, and enterprise beans. The extensions enable Java Platform, 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.
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.