blob: 1d312cb07925ab3dfd205e1779c5dc59e86cf315 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>The Web deployment descriptor editor</title>
</head>
<body id="ccwebxml"><a name="ccwebxml"><!-- --></a>
<h1 class="topictitle1">The Web deployment descriptor editor</h1>
<div><p>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. </p>
<p>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.</p>
<div class="p">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: <ul><li><b>Overview</b> - provides a quick summary of the contents in the Web
deployment descriptor and lets you add, remove, or change the contents.<p></p>
<p></p>
</li>
<li><b>Servlets</b> - 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.<p></p>
</li>
<li><b>Filters</b> - lets you create a new filter, add an existing filter
to the deployment descriptor, or remove the selected filter from the deployment
descriptor.<p></p>
</li>
<li><b>Security</b> - lets you define security roles and security constraints.<p></p>
</li>
<li><b>References</b> - lets you add or remove references to the deployment
descriptor. The following are the types of references you can define on this
page: <ul><li>EJB reference - create a reference to an enterprise bean.<p></p>
</li>
<li>Service reference - create a reference to a Web service</li>
<li>Resource reference - create a reference to an external resource</li>
<li>Resource Environment reference - create a reference to administered objects.</li>
<li>JSP Tag Library</li>
</ul>
<p></p>
</li>
<li><b>WS Handler</b> - 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. <p></p>
</li>
<li><b>Pages</b> - 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.<p></p>
</li>
<li><b>Variables</b> - lets you add or remove listeners, environment variables,
tag lib references, context parameters and MIME Mappings.<p></p>
</li>
<li><b>WS Extensions</b> and <b>WS Bindings</b> - These pages, which appear
only if you have created a Web service, let you configure extension and binding
information for the Web service.<p></p>
</li>
<li><b>Extensions</b> - lets you specify settings for WebSphere<sup>®</sup> extensions
(such as enabling reloading). Other settings include MIME filters, JSP attributes,
file serving attributes, invoker attributes, and servlet caching configurations. <p></p>
</li>
<li><b>Source</b> - lets you edit the web.xml source directly.<p></p>
</li>
</ul>
</div>
<div class="p">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). <p></p>
</div>
<div class="p">In addition to the configuration information in the web.xml file, other
deployment descriptors in a Web project include the following information: <ul><li>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.<p></p>
</li>
<li>IBM<sup>®</sup> 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. <p></p>
</li>
</ul>
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.</div>
<p>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.</p>
</div>
<div><p><b class="relconceptshd">Related concepts</b><br />
<a href="cwebprojects.html">Web projects</a><br />
<a href="ccwtover.html">Web application overview</a><br />
<a href="cwservbn.html">Servlets</a><br />
<a href="cpdjsps.html">JavaServer Pages (JSP) technology</a><br />
</p>
<p><b class="reltaskshd">Related tasks</b><br />
<a href="twedtwbx.html" title="">Configuring Web applications using the Web deployment descriptor editor</a><br />
<a href="twsrvwiz.html" title="">Creating servlets</a><br />
<a href="twimpwar.html" title="">Importing Web archive (WAR) files</a><br />
</p>
</div>
</body>
</html>