警告: [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项目毫无影响。

最新文章

  1. 使用vbs脚本进行批量编码转换
  2. Java之美[从菜鸟到高手演变]之设计模式
  3. Asp.Net MVC3.0网站统计登录认证的在线人数
  4. 转:[gevent源码分析] 深度分析gevent运行流程
  5. 如何备份MySql的数据库
  6. jquery uploadify插件多文件上传
  7. uwsgi性能调忧
  8. 事务之使用JDBC进行事务的操作
  9. org.apache.commons.lang.StringUtils 中 Join 函数
  10. Debian6单用户模式
  11. 基于Git项目管理客户端SourceTree的免注册安装及远程连接方法
  12. 线上CPU100%排查
  13. socket.io诡异的问题
  14. UVA 12293 - Box Game(博弈)
  15. ios中xml和html解析(封装)
  16. Visual Studio 添加SVN插件
  17. PHP中private和public还有protected的区别
  18. catch signal
  19. Linux Shell编程 循环语法
  20. 神经网络卷积层 要回计算output的维度 input 28 卷积是3x3 则output是26 但是channel是卷积核的数量

热门文章

  1. 《Python基础教程》第20章学习笔记
  2. iOS开发之 AES+Base64数据混合加密与解密
  3. zabbix 自定义脚本监控activemq
  4. wamp 两个不同的php.ini
  5. 如何简单的实现一个tab页title的动画效果
  6. Sql Server 查询一段日期内的全部礼拜天
  7. jsp中嵌入的java代码执行对html的影响方式
  8. Frobenius Norm
  9. shell脚本调试运行
  10. 从硬盘设计思想到RAID改良之道