tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Does servlet mapping work in Tomcat 3.1?
Date Wed, 22 Nov 2000 23:08:40 GMT
Toby Piper wrote:

> Ok that worked. Thanks!
> The spec doesn't really say that it matters, although all of the examples I
> could find have the mapping coming AFTER the servlet.
> Seems to me that tags at the same level in the xml file should be processed
> properly no matter what order they are in.
> This behavior (either way) may be defined in the servlet spec but I didn't see
> it.

The required element order is defined in the DTD.  Whether the servlet container
enforces that or not is up to the container.  The simplest way to enforce it is to
use a validating XML parser to read web.xml.

For Tomcat 3.x, the web.xml file is parsed with a non-validating parser when the
application is first started, but read with a validating parser if you use custom
tag libraries.  (Don't ask me why the difference -- it was before my time :-).
For Tomcat 4.0, a validating parser is always used, so you will always be required
to respect the element ordering defined in the DTD.

> Thanks again.

Craig McClanahan

View raw message