Tomcat 4.1中出现的错误一例

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规范,就会报如上的错误

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值