<tfoot id='nZ04q'></tfoot>
      • <bdo id='nZ04q'></bdo><ul id='nZ04q'></ul>
        <i id='nZ04q'><tr id='nZ04q'><dt id='nZ04q'><q id='nZ04q'><span id='nZ04q'><b id='nZ04q'><form id='nZ04q'><ins id='nZ04q'></ins><ul id='nZ04q'></ul><sub id='nZ04q'></sub></form><legend id='nZ04q'></legend><bdo id='nZ04q'><pre id='nZ04q'><center id='nZ04q'></center></pre></bdo></b><th id='nZ04q'></th></span></q></dt></tr></i><div id='nZ04q'><tfoot id='nZ04q'></tfoot><dl id='nZ04q'><fieldset id='nZ04q'></fieldset></dl></div>

        <small id='nZ04q'></small><noframes id='nZ04q'>

      1. <legend id='nZ04q'><style id='nZ04q'><dir id='nZ04q'><q id='nZ04q'></q></dir></style></legend>

      2. 我可以在一个 Web 应用程序中有两个 web.xml 文件吗?

        Can I have two web.xml files in a single web application?(我可以在一个 Web 应用程序中有两个 web.xml 文件吗?)

        <small id='e7skc'></small><noframes id='e7skc'>

            <bdo id='e7skc'></bdo><ul id='e7skc'></ul>
            1. <tfoot id='e7skc'></tfoot>

                <tbody id='e7skc'></tbody>
            2. <legend id='e7skc'><style id='e7skc'><dir id='e7skc'><q id='e7skc'></q></dir></style></legend>

                • <i id='e7skc'><tr id='e7skc'><dt id='e7skc'><q id='e7skc'><span id='e7skc'><b id='e7skc'><form id='e7skc'><ins id='e7skc'></ins><ul id='e7skc'></ul><sub id='e7skc'></sub></form><legend id='e7skc'></legend><bdo id='e7skc'><pre id='e7skc'><center id='e7skc'></center></pre></bdo></b><th id='e7skc'></th></span></q></dt></tr></i><div id='e7skc'><tfoot id='e7skc'></tfoot><dl id='e7skc'><fieldset id='e7skc'></fieldset></dl></div>
                  本文介绍了我可以在一个 Web 应用程序中有两个 web.xml 文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我可以拥有一个包含多个 web.xml 文件的应用程序吗?并且两个应用可以有父子关系,从而有两个web.xml吗?

                  Can i Have a single application with more than one web.xml files? And can two applications have a parent child relationship so that there are two web.xml?

                  推荐答案

                  servlet 3.0 以下不能.

                  For below servlet 3.0 you cannot.

                  如果您使用的是 3.0,则有 可能性.

                  If you are using 3.0 there is a possibility.

                  在 JSR 315:Java Servlet 3.0 规范中,引入了 web-fragment.xml 用于在 WEB-INF/lib 下打包的库 jar 的可插入性.web.xml 和 web-fragment.xml 的内容几乎相同.可以在那里定义 servlet、过滤器和侦听器.还可以在给定的 web-fragment.xml 中指定 metadata-complete=true.在后一种情况下,将跳过该 jar 中类的注释处理.使用 web-fragment.xml,库 jar 可以自包含并提供与 Web 相关的元数据信息.

                  In JSR 315: Java Servlet 3.0 Specification, web-fragment.xml is introduced for pluggability of library jars which are packaged under WEB-INF/lib. The content of web.xml and web-fragment.xml are almost the same. One can define servlets, filters and listeners there. One can also specify metadata-complete=true in a given web-fragment.xml. In the latter case, the annotation processing of classes in that jar would be skipped. With web-fragment.xml, library jars can be self-contained and provide web related metadata information.

                  当然,拥有两个 xml 会造成混乱,而且除此之外,如果您解释您的确切要求,您将获得解决问题的良好/标准解决方案.

                  For sure, having two xml creates confusion and besides all, If you explain whats your exact requirement, you'l get a good/standard solution for your problem.

                  这篇关于我可以在一个 Web 应用程序中有两个 web.xml 文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  <tfoot id='ZdYBt'></tfoot>
                    <tbody id='ZdYBt'></tbody>
                      • <bdo id='ZdYBt'></bdo><ul id='ZdYBt'></ul>
                        <legend id='ZdYBt'><style id='ZdYBt'><dir id='ZdYBt'><q id='ZdYBt'></q></dir></style></legend>
                          <i id='ZdYBt'><tr id='ZdYBt'><dt id='ZdYBt'><q id='ZdYBt'><span id='ZdYBt'><b id='ZdYBt'><form id='ZdYBt'><ins id='ZdYBt'></ins><ul id='ZdYBt'></ul><sub id='ZdYBt'></sub></form><legend id='ZdYBt'></legend><bdo id='ZdYBt'><pre id='ZdYBt'><center id='ZdYBt'></center></pre></bdo></b><th id='ZdYBt'></th></span></q></dt></tr></i><div id='ZdYBt'><tfoot id='ZdYBt'></tfoot><dl id='ZdYBt'><fieldset id='ZdYBt'></fieldset></dl></div>

                          <small id='ZdYBt'></small><noframes id='ZdYBt'>