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属性,因此依旧警告
解决方案二:
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的更多相关文章
- [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:lovemu' did not find a matching property.
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.js ...
- 从0开始学Java——eclipse下运行servlet程序警告:Setting property 'source' to 'org.eclipse.jst.jee.server:类名' did not find a matching property.
在使用Eclipse 创建第一个 Servlet之后,并且配置好了tomcat,然后Run on server的之后,提示标题所示错误: 警告: [SetContextPropertiesRule]{ ...
- 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JsonBlog' did not find a matching property.
这个问题困扰很久了,逛了很多论坛,终于得以解决 我的控制台错误如下: 五月 , :: 下午 org.apache.catalina.startup.VersionLoggerListener log ...
- 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:fhcq-oa' did not find a matching property.
当你在使用Eclipse运行web项目时,你可能会看到控制台出现: 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Settin ...
- 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:esignmanage' did not find a matching property.解决
1.开发环境: 环境:myeclipse2015+tomcat7+win10 2.异常: 偶尔在部署项目的时候回发现tomcat7部署后配置文件按照路径居然找不到自己的项目.httP://localh ...
- 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Weixin' did not find a matching property.
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclips ...
- Eclipse报错:Setting property 'source' to 'org.eclipse.jst.jee.server:xx' did not find a matching property
Shell代码 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to ' ...
- 配置servers时,错误:Setting property 'source' to 'org.eclipse.jst.jee.server:hczm' did not find a matching property
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.e ...
- Tomcat_异常_01_Setting property 'source' to 'org.eclipse.jst.jee.server:AWeiXin_QiYe_Demo' did not find a matching property
关于解决方法: 1.解决Setting property 'source' to 'org.eclipse.jst.jee.server的问题 2.eclipse中server location为灰色 ...
随机推荐
- 《TomCat与Java Web开发技术详解》(第二版) 第一章节的学习总结--HTTP组成+基本访问方式
1.需要看懂HTML文件中的组成元素的基本含义.不同的组成元素,可以使得HTML支持文本,图片(img,将图片发给客户端),静态音频/视频(embed src,将音频视频发给客户端),超链接(href ...
- Hadoop MapReduce八大步骤以及Yarn工作原理详解
Hadoop是市面上使用最多的大数据分布式文件存储系统和分布式处理系统, 其中分为两大块分别是hdfs和MapReduce, hdfs是分布式文件存储系统, 借鉴了Google的GFS论文. MapR ...
- android的DrawerLayout用法
DrawerLayout的关键点(我认为的)就在于layout文件的layout_gravity属性的值,只有左右,两种选择,不能从上下滑出来,就算有这个效果也不是这个套路弄出来的. <?xml ...
- Python 自动化之验证码识别
之前公司的验证码比较简单,可以采取直接破解的方式进行登录 部分代码如下: # -*- coding: utf-8 -*- from selenium import webdriver from sel ...
- C语言基础知识【判断】
C 判断1.判断结构要求程序员指定一个或多个要评估或测试的条件,以及条件为真时要执行的语句(必需的)和条件为假时要执行的语句(可选的).C 语言把任何非零和非空的值假定为 true,把零或 null ...
- MongoDB可视化工具 Studio 3T
告别终端使用可视化工具Studio 3T对MongoDB进行数据库的操作. 简单的使用步骤介绍 1.启动MongoDB服务器(方法见MongoDB介绍与安装中的介绍) 2.连接MongoDB服务器 ...
- mxnet编译问题手记
MXNet在64位Win7下的编译安装:https://www.cnblogs.com/noahzn/p/5506086.html http://blog.csdn.net/Jarvis_wxy/ar ...
- spring mvc 伪静态处理
spring mvc 伪静态处理 @RequestMapping(value = JsonUrlCommand.webshare_get_opuss+"/u{u:[\\w\\W]+}p{p: ...
- 执行动态的delphi脚本
相关资料:https://www.cnblogs.com/linyawen/archive/2011/10/01/2196950.html 如何在程序中执行动态生成的Delphi代码 经常发现有人提这 ...
- Windows下oracle-win-64-11g安装步骤
一. Oracle 下载 官方下地址 http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.htm ...