【问题标题】:What is the "source" attribute of the Context element of an Apache Tomcat configuration file for?Apache Tomcat 配置文件的 Context 元素的“源”属性是什么?
【发布时间】:2011-01-12 20:58:00
【问题描述】:

它在某种程度上与 Eclipse 相关。例如:

<Host>
    <Context docBase="foo" path="/foo" reloadable="true"
        source="org.eclipse.jst.j2ee.server:foo" />
</Host>

【问题讨论】:

  • 这当然不是标准属性 (tomcat.apache.org/tomcat-6.0-doc/config/context.html)。你在哪里看到的?
  • 它位于我在 Eclipse 中创建 Tomcat 服务器时生成的 server.xml(在“服务器”选项卡中),并向其中添加了“foo”项目。

标签: eclipse configuration tomcat


【解决方案1】:

Eclipse WTPsource 属性添加到与项目相关的&lt;Context&gt; 元素中,以标识与上下文相关联的源代码的位置(因此,工作空间中的实际项目已部署到此服务器)在 Eclipse 中)。

如果您因为 Tomcat 启动期间的警告而对此感到疑惑,那么由于 Tomcat 6.0.16 中的任何“无法识别”的 XML 标记和属性在 context.xmlserver.xml 中都会在启动期间产生有关它的警告,尽管有实际上没有 DTD。

忽略它。 Tomcat 应该可以正常工作,Eclipse 对此很满意。它不会发生在具有有价值的 WAR 文件的实际生产环境中。

【讨论】:

    猜你喜欢
    • 2017-07-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-10
    • 2019-10-20
    • 1970-01-01
    • 1970-01-01
    • 2016-06-04
    • 1970-01-01
    相关资源
    最近更新 更多