免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1210 | 回复: 0
打印 上一主题 下一主题

转载一个Tomcat错误分析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-24 09:34 |只看该作者 |倒序浏览

Tomcat 4.1中出现的错误一例
SEVERE: Parse Error at line 5 column 19: Document root element "web-app", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null".
SEVERE: Parse Error at line 5 column 19: Document is invalid: no grammar found.
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
偶用的是Tomcat 4.1.24+MyEclipse,结果在新建一个项目中出现了如上问题,郁闷了好久,查阅资料若干,最后总结如下:
我到网路上查,看见说是Tomcat 4.xx should use the 2.3 DTD spec ,If you're using the 2.4 spec, you'll need Tomcat 5.
确实web.xml中用的是2.4 spec。
-- ---- ---- ---- ---- ---- --
org.apache.commons.digester.Digester error SEVERE: Parse Error at line 6
column 19: Document root element "taglib ", must match DOCTYPE root "null ".
org.xml.sax.SAXParseException: Document root element "taglib ", must match
DOCTYPE root "null ".
-- ---- ---- ---- ---- ---- --
So, I tryed finding the error looking through the tld files, googling a bit
and so on, until I tryed removing the jstl.jar and standard.jar from my
web-applications. Suddenly no error was reported.
结论:Tomcat4.1.24中是Servlet2.3规范,不支持2.4规范,因此如果在项目中添加了jstl.jar或者项目的web.xml中出现2.4规范,就会报如上的错误
转载自:
http://blog.java-cn.com/user1/5023/archives/2005/23365.html


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9085/showart_189433.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP