tomcat警告:Setting property 'source' to 'org.eclipse.jst.j2ee.server:ServletPro' did not find a matching property

警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.j2ee.server:ServletPro‘ did not find a matching property.

原因:这是因为我们在eclipse下,通过tomcat部署web工程时,tomcat的配置文件server.xml中会自动生成一个关于该web工程的配置信息,类似于下面的东西:

而server.xml的 Context元素不支持名称为source的属性,所以会发出警告

解决方案一:

关闭tomcat,双击eclipse下tomcat服务器,在出来的Tomcat server at localhost页面中找到server options选项,选中其中的选项"Publish modual contexts to separat XML file",保存后重启tomcat,这样重新发布web项目时,就不会将Context添加到server.xml文件中,而是在$CATALINA_BASE/conf/[enginename]/[hostname]/下生成一个[webappname].xml的文件,如下:

ServletPro.xml中的内容如下:

但其实这样启动tomcat后还是会警告,因为tomcat启动时会读取$CATALINA_BASE/conf/[enginename]/[hostname]/下的所有.xml文件(这一点可以参看我的另一篇博客:tomcat启动以及运行时部署应用),结果依旧发现Context元素不支持source属性,因此依旧警告

解决方案二:

http://stackoverflow.com/questions/3566146/setting-property-source-to-org-eclipse-jst-jee-serverjsftut-did-not-find-a

This is not an error. This is a warning. The difference is pretty huge. This particular warning basically means that the <Context> element in Tomcat‘s server.xml contains an unknown attribute source and that Tomcat doesn‘t know what to do with this attribute and therefore will ignore it.

Eclipse WTP adds a custom attribute source to the project related <Context> element in the server.xml of Tomcat which identifies the source of the context (the actual project in the workspace which is deployed to the particular server). This way Eclipse can correlate the deployed webapplication with an project in the workspace. Since Tomcat version 6.0.16, any unspecified XML tags and attributes in the server.xml will produce a warning during Tomcat‘s startup, even though there is no DTD nor XSD for server.xml.

Just ignore it. Your web project is fine. It should run fine. This issue is completely unrelated to JSF.

大意其实和上面的差不多,也是Context不支持source属性,这个source属性是Eclipse WTP自定义的一个属性,用来绑定发布的web项目和在workspace中的工程,你可以忽略这个警告,因为它对我们的web项目毫无影响。

tomcat警告:Setting property 'source' to 'org.eclipse.jst.j2ee.server:ServletPro' did not find a matching property

时间: 2024-10-19 12:54:53

tomcat警告:Setting property 'source' to 'org.eclipse.jst.j2ee.server:ServletPro' did not find a matching property的相关文章

eclipse使用tomcat打开maven项目时,报警告 警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:wechatManage&#39; did not find a matching property.

我是Tomcat7.0,网上的一些做法根本实现不了!而且一个copy一个,真的烦. 我的解决方法: 将server.xml文件中的 <Context docBase="wechatManage" path="/wechatManage" reloadable="false" source="org.eclipse.jst.jee.server:wechatManage"/> 改成 <Context docBa

警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:20160928&#39; did not find a matching property

新建一个动态web工程,在web-content目录下新建了一个a.jsp文件如下: 在servlet服务器上运行a.jsp,本来除以0应该出现报错,但是网页却显示如下结果: 控制台看到如下警告: 症状原因: 在eclipse配置好的tomcat服务器上双击,打开tomcat服务器的配置界面.按如下操作配置服务器:在Server Options勾上的选项,会在你部署web项目20160928 服务器会在tomcat根目录\conf\Catalina\localhost下自动创建的.xml的单应用

警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:build-manager&#39; did not find a matching property.

今天用Eclipse运行web项目的时候,看到控制台出现:WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:firstProject' did not find a matching property. 这样的字样,说的是server.xml的Service标签里的Engine标签里的Host标签里的Co

警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:JsonBlog&#39; did not find a matching property.

这个问题困扰很久了,逛了很多论坛,终于得以解决 我的控制台错误如下: 五月 10, 2016 5:23:03 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/7.0.59 五月 10, 2016 5:23:03 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server built: Ja

部署时发出警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:jx-web&#39; did not find a matching property.的解决方法

警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jx-web' did not find a matching property. 翻译:警告: [设置属性规则]{Context} 设置属性"源"到'org.eclipse.jst.jee.server:jx-web'中没有发现匹配的属性 错误原因: 解决方法:不用管,不影响运行 部署时发出警

Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:web&#39; did not find a matching property原因

这个问题困扰了好久,虽然只是tomcat的一个警告,但强迫症让我总觉得不舒服,搜索了好多文章才找到知乎上一篇处理的最好的.另外:能找谷哥,尽量不要度娘,太浪费时间. 具体操作如下: 默认情况下,server.xml的 Context元素不支持名称为source的属性,就出现该警告 双击eclipse下tomcat服务器,在出来的Tomcat server at localhost页面中找到server options选项,选中其中的选项”Publish modual contexts to se

配置servers时,错误:Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:hczm&#39; did not find a matching property

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:hczm' did not find a matching property. SEVERE: Error starting static Resourcesjava.lang.IllegalArgumentException: Document base

警告: [SetContextPropertiesRule]{Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:

当你用Eclipse运行web项目的时候,你就会看到控制台出现: 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestServlet' did not find a matching property. 这样的字样,说的是server.xml的Service标签里的Engine标签里的Host标签里的Context标签配置了一个'source'属性

警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server did not find a matching property.

JAVA WEB 提示: 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:servlet1' did not find a matching property. 解决方法: 1.关闭tomcat服务器,如下图状态 2. 双击tomcat服务器,进入服务器配置界面 3.给server option中的Publish