Hi, 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="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd" version="2.4"> .... </web-app>
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 " ull". org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.j va:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296) at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:155 ) ......
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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com