For some reason on my system I can't get the following elementry
web.xml to validate. It looks like JonAS will only process an XML if
it is valid. For some reason a very similar web.xml on JBoss is
processed fine. My guess is JBoss isn't validating.
The XML file:
<?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">
<web-app>
<display-name>JOnAS-Tomcat Packaging index</display-name>
<description>
Display the context which are preconfigured.
</description>
</web-app>
When I run the SUN XML validator using the DOCTYPE specification for
the DTD I get:
Multi Schema Validator Ver.20030225
using org.apache.xerces.jaxp.SAXParserFactoryImpl
DTD validation will be done.
start parsing a grammar.
element "web-app" is not allowed here
7:10@file:///D:/jonas-3-3-2/webapps/jonas/ctxroot/WEB-INF/web.xml
failed to load a grammar.
But if I provide a local file copy of the
http://java.sun.com/dtd/web-app_2_3.dtd from my system using the
-standalone option (I think it ignores the <!DOCTYPE ...> in the XML)
than it parses fine by the validator.
I don't inderstand what is wrong. Any help would be great. I have
been tearing my hair out on this simple problem, anmd I don't have
much more to loose!