Yea! Adding the DOCTYPE solved my parsing problems! Thanks Mark.
I realize now that I had taken it out when I was having another problem. I originally
created the files using UTF-8 encoding:
<?xml version="1.0" encoding="utf-8"?>
But the parser would puke up and wouldn't even start:
Apr 12, 2004 7:27:05 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column -1: Document root element is missing.
org.xml.sax.SAXParseException: Document root element is missing.
...
I later discovered that my XML-savvy text editor was inserting a byte-order mark at
the beginning of the file, which the XML parser apparently doesn't appreciate. Taking
that out solved (most) of my parsing problems -- but not until after I'd butchered the
file. ;)
Thanks again for all the help,
James
Mark Thomas wrote on Sunday, April 18, 2004:
>Try putting
>
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
>At the start of the web.xml file
>
>Mark
>
>> -----Original Message-----
>> From: James Bucanek [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, April 18, 2004 6:55 AM
>> To: Tomcat Users List
>> Subject: Re: Parser Errors on startup
>>
>> James Bucanek wrote on Saturday, April 17, 2004:
>> >Tomcat 4.1.xx/Mac OS X Server (BSD)
>> >
>> >I'm getting the following errors when I startup Tomcat, and I can't
>> >for the life of me figure out what to do about it:
>>
>> Well, I've managed to narrow the problem down. The <Host> I
>> defined in server.xml isn't the problem. The problem is that
>> the <Host> I defined caused other webapp's to be deployed
>> automatically, and it is apparently the web.xml file that is
>> throwing the SAXParseExceptions.
>>
>> I kept taking things out of the web.xml file to try and zero
>> in on the problem. Unfortunately, I'm now left with the
>> following web.xml:
>>
>> <web-app>
>> </web-app>
>>
>> Whenever I start Tomcat, or reload the web application, the
>> following gets written to ${catalina-home}/logs/catalina.out:
>>
>> Apr 17, 2004 10:45:01 PM org.apache.commons.digester.Digester error
>> SEVERE: Parse Error at line 1 column -1: Element type
>> "web-app" is not declared.
>> org.xml.sax.SAXParseException: Element type "web-app" is not declared.
>> at org.apache.crimson.parser.Parser2.error(Parser2.java:3317)
>> at
>> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469)
>> at
>> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
>> at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
>> at
>> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
>> at
>> org.apache.commons.digester.Digester.parse(Digester.java:1548)
>> at
>> org.apache.catalina.startup.ContextConfig.applicationConfig(Co
>> ntextConfig.java:282)
>> at
>> org.apache.catalina.startup.ContextConfig.start(ContextConfig.
>> java:639)
>> at
>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(Conte
>> xtConfig.java:243)
>> at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
>> ifecycleSupport.java:166)
>> at
>> org.apache.catalina.core.StandardContext.start(StandardContext
>> .java:3582)
>> at
>> org.apache.catalina.startup.HostConfig.checkWebXmlLastModified
>> (HostConfig.java:614)
>> at
>> org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
>> at java.lang.Thread.run(Thread.java:552)
>>
>> Note: If I have other declarations in web.xml, I get a SAX
>> Exception for (basically) every tag in the file.
>>
>> They only way to eliminate this Exception is to remove the
>> web.xml file altogether. This just doesn't make any sense to
>> me. Any insight would be appreciated.
>>
>> ______________________________________________________
>> James Bucanek <mailto:[EMAIL PROTECTED]>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
______________________________________________________
James Bucanek <mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]