There are a number of web.xml files bundled with the tomcat binary installer. Their headers are however a mixture of different versions - some are v2.3 and some are v2.4. This has led me to make errors. For example I accidentally based a web.xml file on a 2.3 DTD and then used the 2.4 feature <include- prelude> within it, which was then silently ignored (see report 31670). I appreciate that 2.3 is still valid, and it is useful to distribute examples of each version. I'd like to suggest making all bundled web.xml files the latest version currently (2.4) but include the 2.3 headers commented out? That way, people can clearly see the choice they are making, but can use all the new features without worrying about "upgrading" the bundled web.xml examples.
You are welcome to submit pacthes ;-). But it's celarly a user errors, so chaning this to an Enhancement. -- Jeanfrancois
Agreed - using a 2.4 feature in a 2.3 file is clearly a user error. However, should tomcat not throw an exception when it sees a tag in web.xml that is not defined in its DTD? Tomcat is usually very strict at reporting problems in web.xml, which is a very useful feature, this is partly why I reported this problem.
Please delete/ignore my last comment above - I added it to the wrong bug report :)
I'll take a look at making the web.xml files all use the same schema (the 2.4 one). But Tomcat doesn't validate and won't validate your web.xml files for you: use a validator for that. Or submit your own enhancement patch to be considered.
Done for Tomcat 5.0.30 and 5.5.4.