使用 Web 部署描述符编辑器配置 Web 应用程序

您可以在 Web 部署描述符编辑器中配置具有 Web 2.5 或 Web 3.x 模块的 Web 项目的部署描述符。对于 Web 2.4 及更低版本的模块,请使用源代码 XML 编辑器。

关于此任务

限制: 虽然 IBM® WebSphere® Application Server Developer Tools for Eclipse Beta 中的 Web 3.1 项目支持允许创建 web.xml 部署描述符文件,但是,请勿创建此文件。WebSphere Application Server Liberty 不具有 Web 3.1 项目支持。如果创建了此文件,那么将收到如下运行时错误:
CWWKC2262E: The server is unable to process the 3.1 version and the 
http://xmlns.jcp.org/xml/ns/javaee namespace in the /WEB-INF/web.xml deployment descriptor

创建 Web 2.2、2.3、2.4、2.5、3.0 或 3.1 Web 项目时,“新建 Web 项目”向导可选择将 web.xml 文件放在项目的 WEB-INF 目录中。对于 Web 3.0 和 Web 3.1 项目,web.xml 文件是可选的。此文件指定在 Web 开发环境中创建的模块的部署信息。

您在 web.xml 文件中用来指定部署信息的编辑器取决于 Web 模块的规范版本。

过程

Icon that indicates the type of topic Task topic
Timestamp icon Last updated: last_date

File name: twedtwbx.html