# Web facet 页

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/idea/llms.txt).

`文件 | 项目结构 | 模块 | <module> | web`

`文件 | 项目结构 | Facets | web (<module>)`

使用此页面编辑您的 Web facet 设置。

|  条目  |  描述  |
| --- | --- |
|  名称  |  Facet 的名称。  |
|  部署描述符  |     为您的应用程序创建 [部署描述符](https://en.wikipedia.org/wiki/Deployment_descriptor) 列表。       !["添加"按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)  `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS))。 创建  `web.xml`  并将其添加到列表中。 如果列表中已存在相应的描述符，则该功能不可用。       !["移除"按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg)  `Alt+Delete` (Windows), `⌘ ⌦` (macOS), `⌘ ⌦` (IntelliJ IDEA Classic (macOS)), `⌘ ⌦` (macOS System Shortcuts), `Alt+Delete` (XWin), `Alt+Delete` (GNOME), `Alt+Delete` (KDE), `Alt+Delete` (Emacs), `Alt+Delete` (Sublime Text), `⌘ ⌦` (Sublime Text (macOS)), `Ctrl+R, D` (Visual Studio), `⌘ R, D` (Visual Studio (macOS)), `Alt+Delete` (NetBeans), `Alt+Delete` (Eclipse), `Alt+Delete` (Eclipse (macOS))。 从列表中移除所选描述符。       ![编辑按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.edit.svg)  `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))。 将所选描述符替换为同类型的另一个描述符。         添加应用服务器特定描述符。   创建特定于应用服务器的部署描述符（例如  `glassfish-web.xml` 、  `jboss-web.xml` ），并将其添加到列表中。     |
|  Web 资源目录 ![Web 资源文件夹](https://resources.jetbrains.com/help/img/idea/2026.3/app.nodes.webFolder.svg)  |     指定包含您的 Web 应用资源（例如网页、图像等）的目录。 （   web 资源目录   列）及其在相应 [工件](working-with-artifacts.html)中的位置（   相对于部署根目录的路径   列）。       要将资源目录包含在工件中，您应确保工件配置包含一个   Web Facet 资源   元素。 所有资源目录都作为一个整体包含在工件中。在这种情况下，   /   在   相对于部署根目录的路径  列中对应于工件配置中该元素的根目录。     |
|  源根  |     请选择要包含在 [source roots](null)中的 [artifact](working-with-artifacts.html)。 注意：        * 如果在制品配置中存在 '<ModuleName>' 编译输出 元素，则所有源根的类将包含在相应的制品中，而不管此处选择了哪些源根。    * 要包含此页面上选定源根中的类，在配置 artifact 时，请使用以下内容： ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) `\| JavaEE Facet 类 \| Web (位于 <ModuleName>)` 。 结果，构件配置中的相应元素将显示为 '<ModuleName>' 模块：'Web' Facet 类 。    |

## See also

### 过程

[启用 Web 应用程序支持](enabling-web-application-support.html)

