What is the “source” attribute of the Context element of an Apache Tomcat configuration file for?

拟墨画扇 提交于 2020-04-05 19:30:52

问题


It's somehow related to Eclipse. For example:

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

回答1:


Eclipse WTP adds the source attribute to the project-related <Context> element to identify the location of the source code associated with the context (thus, the actual project in the workspace which has been deployed to this server from inside Eclipse).

If you wondered about this due to a warning during Tomcat's startup, since Tomcat 6.0.16 any "unrecognized" XML tags and attributes in the context.xml or server.xml will produce a warning about it during the startup, although there's actually no means of a DTD.

Just ignore it. Tomcat shall work fine and Eclipse is happy with it. It won't occur in real production environment with a worthfully WAR file.



来源:https://stackoverflow.com/questions/2196367/what-is-the-source-attribute-of-the-context-element-of-an-apache-tomcat-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!