RT,警告如下:
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2HelloWorld' did not find a matching property.
按照网上搜索了下,Tomcat6也有这个问题,但是Tomcat6中可以解决这个问题:在Eclipse里面停止服务器,双击服务器名称,在服务器配置页面中选中Publish module contexts to separate XML files选项就能解决,我新建一个Tomcat6的服务器也的确如此,但是在Tomcat7下面还是有问题。依旧警告:
信息: Deploying configuration descriptor Struts2HelloWorld.xml from D:\Trouble\Workspace\J2EE.metadata.plugins\org.eclipse.wst.server.core\tmp3\conf\Catalina\localhost
2011-7-12 11:22:46 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2HelloWorld' did not find a matching property.
2011-7-12 11:22:46 org.apache.coyote.AbstractProtocolHandler start
怎么解决啊?求教~~
问题补充
自己安慰一下自己,求帮助~
Tomcat7 Eclipse3.7 添加Dynamic Web Project后启动服务器有警告
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
5条回答 默认 最新
- 「已注销」 2011-07-12 16:32关注
从官方下载的tomcat,6、7都用过,使用[b]conf/Catalina/localhost/xxx.xml方式进行开发和发布应用[/b]还没有发生施主这样的问题。
标准xxx.xml发布样例,[url=http://tomcat.apache.org/tomcat-7.0-doc/config/context.html]官方配置参考[/url]:
[code="xml"]
<?xml version="1.0" encoding="UTF-8" ?>
[/code]- 现象: [quote] 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2HelloWorld' did not find a matching property. [/quote]
-
分析:
a. SetContextPropertiesRule源代码:
[code="java"]
@Override
public void begin(String namespace, String nameX, Attributes attributes)
throws Exception {for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.getLocalName(i); if ("".equals(name)) { name = attributes.getQName(i); } if ("path".equals(name) || "docBase".equals(name)) { continue; } String value = attributes.getValue(i); if (!digester.isFakeAttribute(digester.peek(), name) && !IntrospectionUtils.setProperty(digester.peek(), name, value) && digester.getRulesValidation()) { digester.getLogger().warn("[SetContextPropertiesRule]{" + digester.getMatch() + "} Setting property '" + name + "' to '" + value + "' did not find a matching property."); } }
}
[/code]
b. 实际上查看[url=http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes]Context配置参考[/url],在xml节点"Context"中并不存在source这样的属性(attributes),所以就会出来一个warn警告信息。
[b]以上没有仔细研究tomcat源代码,不是100%确信就是这样的原因。[/b]
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
- ¥15 DruidDataSource一直closing
- ¥20 气象站点数据求取中~
- ¥15 如何获取APP内弹出的网址链接
- ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
- ¥50 STM32单片机传感器读取错误
- ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
- ¥15 (关键词-阻抗匹配,HFSS,RFID标签)
- ¥50 sft下载大文阻塞卡死
- ¥15 机器人轨迹规划相关问题