警告: [SetContextPropertiesRule]{Context} Setting property 'source' to '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'属性,属性值是'org.eclipse.jst.jee.server:TestServlet'.
但问题是Context标签是不支持source这个属性的,所以跳出了警告,所以大家也发现的是,尽管有警告,但是大部分人的程序是依然可以运行没有问题的,但少部分人的不能够运行。
也许你已经在网上查到很多像这样的问题,而且也给出了解决办法,但是你照着解决的方法去做了,警告依然存在!
那现在你就可以跟着我的步骤来做了:
我先说一下网上别人所说的步骤,埋个伏笔
1.双击Servers里的Tomcat v7.0 at localhost
2.然后跳出个界面:
看到没,在Server Options选项里有个Publish module contexts to separate XML files的选项,到这里我们也一样把勾勾上,不过问题不是这样就一定解决了,我说过有的朋友这样做了,问题依然没有解决,把勾勾上以后记得保存,如果警告依然存在的朋友们跟着我继续往下看。
3.
大家仔细对比下你自己的和我图片上的,你会发现你默认的选项应该是Use workspace metadata这个选项,只不过是笔者我改为了tomcat的安装路径罢了,因为Use workspace的路径文件夹不方便后面的讲解中要找的文件,所以笔者使用第2个tomcat安装目录来操作,而Deploy path:你如果没有改过的话,应该是叫wtpwebapps,因为在写文章之前,我已经改掉了也不清楚是不是这个名字了,但确定的一点是,它肯定不是webapps的,所以此处读者根据自己的Deploy path的值进行下面的操作。
好了准备工作差不多了,现在是重点来了,为什么好多人做了1.2步操作以后就好了而你自己的没好呢?
原因是,在做1 2 步操作之前你们已经运行过程序,而运行以后程序就会在tomcat文件夹下多了一个backup文件夹
里面的目录结构如图:
有没有很熟悉的感觉,没错这就是从tomcat目录里conf文件夹下拷贝过来的文件
接下来直接说操作好了:
4.
删除掉刚才的backup文件夹[backup所在位置根据第3步所说的,因为笔者使用的时tomcat安装目录所以就在目录下就直接发现了,但如果你用的是Use workspace metadata这个选项的话,你就在\workspace\.metadata\.plugins\org.eclipse.wst.server.core路径下可以看到里面有很多的文件,Eclipse就把项目发布到了这里,里面的目录结构和tomcat里面的差不多,总之把\workspace\.metadata\.plugins\org.eclipse.wst.server.core里面的文件全删除了就可以了]
5.
找到tomcat目录里的conf目录里的Catalina目录里有个localhost文件夹,把文件夹里面的文件全删除掉。
6.
此处告诉大家3.4.5步骤纯属告诉你们Eclipse发布的一个细节,删除上面的文件其实不用那么麻烦:
在Servers下Tomcat v7.0 at localhost里,首先右键-->移除里面已经添加的所有工程,然后右键-->Clean清空项目虚拟目录里的文件,然后重新运行你们的程序就可以了。
注意:如果有人想和我一样在第3步server locations里修改项目发布目录的话,只要发布过一次项目你会发现,server locations里面的选项是灰色的,不可以改,怎么办呢,这就需要你照着第6步里面的移除项目,清空文件,然后你就惊奇的发现,server locations可以修改了
参照:http://blog.csdn.net/z69183787/article/details/19911935
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:的更多相关文章
- 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JsonBlog' did not find a matching property.
这个问题困扰很久了,逛了很多论坛,终于得以解决 我的控制台错误如下: 五月 , :: 下午 org.apache.catalina.startup.VersionLoggerListener log ...
- 警告: [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 ...
- 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:20160928' did not find a matching property
控制台看到如下警告: 症状原因: 在eclipse配置好的tomcat服务器上双击,打开tomcat服务器的配置界面.按如下操作配置服务器:在Server Options勾上的选项,会在你部署web项 ...
- 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:CurrencyClientServe
有的说: 在Servers视图里双击创建的server,然后在其server的配置界面中选中"Publish module contexts to separate XML files&qu ...
- 用eclipse javaEE编程时,不管什么程序都会出现这个错误[SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:bookstore' did not find
用eclipse javaEE编程时,不管什么程序都会出现这个错误[SetContextPropertiesRule]{Context} Setting property 'source' to 'o ...
- 警告: [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 ...
- 警告: [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 ...
- 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Zhuo' did not find a matching property.
eclipse里面配置tomcat方法:window -- show view -- other -- 找到servers 点击finish 就会出现servers选项卡在选项卡中右键鼠标 new - ...
- 解决 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:reyo' did not find a matching property.
解决办法是:关闭tomcat,双击eclipse下tomcat服务器,在出来的Tomcat server at localhost页面中找到server options选项,选中其中的选项”Publi ...
随机推荐
- dubbo培训文档
培训文档 1.<服务框架实践与探索> 主题:QCon2011杭州主题演讲,分享Dubbo服务框架的实践历程.主讲:钱霄,梁飞课件:Service Framework Practices.p ...
- 《C和指针》整理一
1.C语言的凝视 在C语言中,假设须要凝视掉一段代码.且代码中可能会已经存在/**/凝视形式,那么能够使用: #if 0 statements #endif 这样的形式来凝视掉 ...
- C语言获取系统当前时间
C语言获取系统当前时间 time_t -- 时间类型 struct tm -- 时间结构 time(&now)函数获取当前时间距1970年1月1日的秒数,以秒计数单位. localtime ( ...
- [leetcode]Construct Binary Tree from Inorder and Postorder Traversal @ Python
原题地址:http://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/ 题意: ...
- vue路由使用踩坑点:当动态路由再使用路由name去匹配跳转时总是跳转到根路由的问题
闲话少说,直接问题: 之前我的路由时这么写的 { path:'/serverInfo/:id', name:'serverInfo', component:() => import('@/vie ...
- Android -- SharedPreferences存储信息
背景 Share ...
- 【Struts2学习笔记(9)】单文件上传和多文件上传
(1)单文件上传 第一步:在WEB-INF/lib下增加commons-fileupload-1.2.1.jar.commons-io-1.3.2.jar. 这两个文件能够从http://common ...
- Word 代码高亮
整理文档比较费事,提供个脚本放在VBA里,使Word 代码高亮的一种方法是改变颜色 'script to high light code In document Private Function is ...
- [Algorithm] Largest sum of non-adjacent numbers
Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Num ...
- B - Sort the Array
找出一个递减序列,假设有两个或两个以上递减序列直接no了,然后对递减序列两端数start.end,然后比較a[start]和a[end+1] . a[end] 和a[start-1] #include ...