Phew! This is my third crack at trying to get Jetty to start up from local DTD/XSD files and I still can't get it to work. Okay, maybe I'm no XML rocket scientist, but the failure coming from the XML parser is just extremely unhelpful (no doubt that all of this is nothing to do with Jetty). I set a local
webdefault.xml file like this in my jetty config:
and it is clearly reading that file because i can do stuff to it and the parser notices the changes. then in that file, i do this:
file:////xml/xsd file:////xml/xsd/web-app_2_4.xsd file:////xml/xsd file:////xml/xsd/j2ee_1_4.xsd
and actually i've tried every variant of the schemaLocation value i can conceive of (literally about a dozen)... and no matter what i do i don't get anything helpful like "couldn't find that xsd file", but a totally generic and useless warning from the XML parser:
XmlParser WARN: ERROR@null line:26 col:18 : org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'.
WebApplicationContext WARN: Configuration error on src/webapp
: cvc-elt.1: Cannot find the declaration of element 'web-app'.
it would really help if the thing told me /why/ it can't find that element. since the element is clearly defined in the xsd file for web-app_2_4.xsd, it seems like it should be giving me some OTHER error.
has anyone successfully used jetty and webdefault.xml with local xsd files? if so, i'd LOVE to see your files.