现在的位置: 首页 > 综合 > 正文

Tomcat下配置server.xml:都是xmlValidation=”true”惹的祸

2013年11月16日 ⁄ 综合 ⁄ 共 321字 ⁄ 字号 评论关闭

在Eclipse3.1下配置好了Tomcat,然后新建了一个project,把以前的一些源代码copy过来,启动Tomcat的时候出现Cannot find the declaration of element 'web-app'错误!经过一番研究后发现在server.xml中的Host属性中多了xmlValidation="true"。去掉这个属性后就可以正常启动了。

同时在启动Tomcat时的信息也会提示:XML validation enabledXML validation disabled

但我还没有找出xmlValidation="true"时到底哪里出错了,我也试着修改web.xml文件,但没成功!有类似问题的或知道我的问题出在哪,欢迎讨论!

抱歉!评论已关闭.