The online web.xml validator at http://www.mslinn.com/sites/tomcat catches
this error.

>> Also, just a note about the web.xml doc. I looked at one or two
>>of the DTDs and there does not seem to be documentation about this:
>> One must put all the <servlet> entries at the beginning of the xml
>doc, and then all the <servlet-mapping> entries at the end. If you
>>try to mix the two type of entries the parser complains.
>>

>The DTDs actually do state the ordering requirement.
>
>Up near the top of the DTD, do you see the line that starts:
>
>       <!ELEMENT webapp (icon?, display-name?, description?, ...
>
>and so on?  That line is stating that the optional <icon> element goes
>first, followed by the optional <display-name> element, and so on.  The
>asterisk after entries like "servlet*" and "servlet-mapping*" state that
>you can have zero or more of these elements, but they all have to appear
>at that point in the XML file.
>
>For further info on the DTDs, see the XML 1.0 spec.
>
>Craig McClanahan


Mike Slinn

Reply via email to