[SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:chartD

警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:chartDemo' did not find a matching property.
七月 05, 2016 8:24:12 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor HOTEL.xml from Z:\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost
七月 05, 2016 8:24:12 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HOTEL' did not find a matching property.
七月 05, 2016 8:24:12 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(Z:\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\HOTEL\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
七月 05, 2016 8:24:13 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor kyc.xml from Z:\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost
七月 05, 2016 8:24:13 下午 org.apache.catalina.startup.SetContextPropertiesRule begin

警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:kyc' did not find a matching property.


在eclipse下,通过tomcat部署web工程时,tomcat的配置文件server.xml中会自动生成一个关于该web工
程的配置信息(此信息会在server.xml下方),类似于下面的东西:

Server.xml
代码
<Context docBase="webProject" path="/webProject" reloadable="true" source="org.eclipse.jst.jee.server:webProject
" />

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

 

解决办法是:关闭tomcat,双击servers下的tomcat在出来的Tomcat server at
localhost页面中找到server options选项(在页面的下方),选中其中的选项”Publish modual contexts
to separat XML files“,保存,重新启动tomcat。

但是我这么改过之后并没有好用

网上还有如下解决方法

关闭tomcat,在server.xml中将Context的source属性去掉,然后将docBase属性指向默认的wtpwebapps目录下对应的项目如:
如:<Context docBase="../wtpwebapps/你的项目名" path="/" reloadable="true" />
怎么查看你的wtpwebapps文件夹在什么地方:
server控制台:右击属性-general看到location就是你的tomcat工作目录,如果显示是你的项目目录,就Project/.metadata/.plugins/org.eclipse.wst.server.core/下的一个临时文件夹下以temp+数字命名,在其目录找到wtpwebapps,里面就有你的项目了。

但是这种,不是用我这次出现的情况,开始我还以为是缓存问题,特意把我的项目删除了,重新clean build,还是不行

3、灵感来与博客:

我的解决办法:

1) 先把servers的项目删除 remove

 

 

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

2) 在把tomcat服务器的配置文件修改

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

3)  把你项目的配置删除

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

4) 重新clean build ,这样就可以了

 由于我没有找到server.xml,就把Tomcat导入到了Libraries,结果竟然好使了



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值