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

淡淡的烟草味﹌ 2022-09-23 05:51 106阅读 0赞

警告: [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
代码

而默认情况下,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目录下对应的项目如:
如:
怎么查看你的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 条评论,106人围观)

还没有评论,来说两句吧...

相关阅读