Tomcat web.xml 文档

5

我在部署Java应用到Tomcat时遇到了一些问题,想知道web.xml的文档在哪里。我找不到它。

我正在使用标准的web.xml,但我想知道所有特定的XML标签是什么意思。

当然,通常使用标准的web.xml就可以工作,但我真的想看一些文档。

我已经在Tomcat 7文档网站上查找过,但找不到。

3个回答

6
文件web.xml也被称为部署描述符,它与tomcat无关。如果您想查找有关部署描述符的文档,请查看Java Servlet规范,第13章以及附录A和B。(这是版本2.4的文档,也许您更喜欢搜索最新版本3.1)。
现在,如果您正在寻找位于CATALINA_HOME/conf中的文件web.xml的文档,则该文件本身已经具有良好的自我记录的内部注释。顺便说一下,第一个注释说:
  <!-- This document defines default values for *all* web applications      -->
  <!-- loaded into this instance of Tomcat.  As each application is         -->
  <!-- deployed, this file is processed, followed by the                    -->
  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->
  <!-- applications.                                                        -->
  <!--                                                                      -->
  <!-- WARNING:  Do not configure application-specific resources here!      -->
  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->

谢谢,这回答了我的问题。 - Martin

0

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接