警告:[SetPropertiesRule]Setting property 'source' to xxx did not find a matching property.的消除

2023-10-29

启动JSP页面时报错,全文如下:

九月 25, 2016 7:47:39 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:(工程名)' did not find a matching property.

报错原因:

默认情况下,Tomcat在server.xml的Context节点不支持名称为source的属性,就出现该警告。

解决办法:

在服务器配置页选择在servers视图下双击当前服务器,弹出配置页面:


Servers设置页面截图

相关解释:(出处待定)

Tomcat Publishing Options
Two new options which affect publishing are now available in the Server Options section of the Tomcat server editor. The Tomcat server must be 5.0.x or later for these options to be enabled. The Serve modules without publishing option does what it says. Web content will be served directly from the "WebContent" folder of the Dynamic Web Project. A customized context is used to make the project's dependencies available in the Web application's classloader. 
The Publish module contexts to separate XML files option will publish contexts using the preferred method of separate XML files under the "conf/Catalina/localhost" directory, rather than keeping them in the "server.xml" file. A couple of improvements for this option are noted in Bugs 180931 and 180936.

字面意思大致为:

Tomcat发布选项

  Tomcat服务器编辑器中的【服务器选项】部分目前新增了两个影响发布环节的选项。启用这两个选项,要求Tomcat服务器版本在5.0.x以上。【The Serve modules without publishing】选项实现的功能如其名称所述,网页内容将直接从动态网页项目(Dynamic Web Project)的“WebContent”(网页内容)文件夹中获取。为确保Web应用程序的类加载器在工程项目的依赖项中可用,需要用到一个自定义的开发环境(context)。

  【The Publish module contexts to separate XML files】选项将优先采用分离“conf/Catalina/localhost”目录下XML文件的方式发布开发环境,不会令其保存在server.xml文件中。关于该选项的一些改进措施详见Bugs 180931与180936。

  原文不是很懂,查网上的说法,大概意思是勾选第一个选项后,让tomcat直接使用WebContent下的内容,无需发布到设置前的路径下:<workspace>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps。其他改动:①会将tmp0\wtpwebapps目录下相关的resources删除;②会修改Servers/Tomcat v8.0 Server at localhost-config/servers.xml中的serveModulesWithoutPublish属性,值被设置为true。

  至于勾选第二项,也就是本文需要的那一项,会把带有source属性的<Context.../>节点从server.xml中单独分离出来,这样就消除了警告。相关的改动:①上述servers.xml中的saveSeparateContextFiles属性将被设置为true;②tmp0/conf/server.xml中的报错节点<Context>将被移动至tmp0/conf/Catalina/localhost/appName.xml中。


参考资料:

http://blog.csdn.net/anglebeat/article/details/23995967

https://my.oschina.net/uniquejava/blog/80945

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

警告:[SetPropertiesRule]Setting property 'source' to xxx did not find a matching property.的消除 的相关文章

随机推荐