On Fri, 18 May 2001, Marjou Xavier wrote:
> Hello
>
> For information :
>
> I got a problem with web.xml (attached File1 file) and Tomcat Milestone 4.0 b5:
> PARSE error at line 18 column -1
> org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app servlet
>
> This same file was working with Tomcat V3.2 and 3.3
>
> Nevertheless, the equivalent web.xml of File2 is working fine
>
You got the error on File1 because File1 is not valid.
The DTD for the web application deployment descriptor defines the order of
the elements, and in particular all <servlet> definitions must come before
all <servlet-mapping> definitions. Tomcat 4.0 uses a validating XML
parser when it reads your web.xml file, so the parser throws an error at
the second <servlet> definition that it sees.
So why did it work under 3.2 and 3.3? Because they do *not* use a
validating parser when initializing the web app (Jasper does, however, so
you'd have problems if this web app included any JSP pages).
> Xavier Marjou
>
Craig McClanahan