Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat 1.4 commons-digester parse web.xml error  RSS feed

Jo Liang
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have problem running Java Sun J2EE tutorial examples on the tomcat-1.4.12. I believe the problem is tomcat has trouble reading web.xml. But since the web.xml is from Java example, I assume it is correct but something wrong with Tomcat.

Here is my system:
OS: WindowsNT
Java: java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Tomcat: tomcat-1.4.12

Once I add the example WAR file with web.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <web-app xmlns="" xmlns:xsi="" xsi:schemaLocation=" web-app_2_4.xsd" version="2.4">

When I start Tomcat and I get this error message:
Feb 25, 2003 11:56:08 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 6 column 19: Document root element "web-app", must match DOCTYPE root "
org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.j
at org.apache.xerces.util.ErrorHandlerWrapper.error(
at org.apache.xerces.impl.XMLErrorReporter.reportError(
at org.apache.xerces.impl.XMLErrorReporter.reportError(
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(

It seems like the opache commons-digester fail parsing web.xml. So I downloaded the last commons-digester.tar from Jakarta-Apache and put it in %CATALINA_HOME%/server/lib (replace the original one). However, I still have this error.
All my setup is pretty standard. So I feel it is very strange that I got this error and couldn't find much answer from web.
Thanks for helping in advance.
- Jo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!