# The Web deployment descriptor editor

The Web deployment descriptor editor lets you specify deployment information for modules created in the Web development environment. The information appears in the web.xml file. Note that you use the Web deployment descriptor to set deployment descriptor attributes. You do not use it to manipulate Web resource content.

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. Whenever you create a new Web project, a minimal web.xml file is automatically created in WEB-INF under the project's Web content folder.

The Web deployment descriptor editor is dynamic and includes many tabbed pages (views) that represent various properties and settings in the deployment descriptor. For example, you can click the Servlets tab to display the Servlets page, in which you can add or remove servlets and JSPs that are used in the Web application. The Web deployment descriptor editor includes the following tabbed pages:

- Overview - provides a quick summary of the contents in the Web deployment descriptor and lets you add, remove, or change the contents.

- Servlets - lets you 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.

- Filters - lets you create a new filter, add an existing filter to the deployment descriptor, or remove the selected filter from the deployment descriptor.

- Security - lets you define security roles and security constraints.

- References - lets you add or remove references to the deployment descriptor. The following are the types of references you can define on this page:
  - EJB reference - create a reference to an enterprise bean.

  - Service reference - create a reference to a Web service
  - Resource reference - create a reference to an external resource
  - Resource Environment reference - create a reference to administered objects.
  - JSP Tag Library

- WS Handler - lets you add and configure handlers for a selected port component. This includes specifying a handler description and display name, specifying implementation details, adding initial parameters, and adding SOAP headers.

- Pages - lets you add or remove welcome and error pages to the deployment descriptor. Also allows you to define the login-config element and add exception types to error pages.

- Variables - lets you add or remove listeners, environment variables, tag lib references, context parameters and MIME Mappings.

- WS Extensions and WS Bindings - These pages, which appear only if you have created a Web service, let you configure extension and binding information for the Web service.

- Extensions - lets you specify settings for WebSphere® extensions (such as enabling reloading). Other settings include MIME filters, JSP attributes, file serving attributes, invoker attributes, and servlet caching configurations.

- Source - lets you edit the web.xml source directly.

Although you can edit web.xml directly, we recommend that you edit the multiple tabbed pages in the Web Deployment Descriptor editor. As you specify deployment information in these tabbed pages, the editor automatically incorporates the appropriate XML tagging in web.xml (or in the appropriate .xmi file).

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.xmi and ibm-web-ext.xmi 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.

Related concepts
Web projects
Web application overview
Servlets
JavaServer Pages (JSP) technology

Related tasks
Configuring Web applications using the Web deployment descriptor editor
Creating servlets
Importing Web archive (WAR) files

(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.