Bug 31671 - web.xml files are mix of 2.3 and 2.4 DTD
web.xml files are mix of 2.3 and 2.4 DTD
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
PC All
: P3 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2004-10-12 14:51 UTC by Steve Kirk
Modified: 2005-03-20 17:06 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Steve Kirk 2004-10-12 14:51:39 UTC
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.
Comment 1 Jean-Francois Arcand 2004-10-12 15:17:17 UTC
You are welcome to submit pacthes ;-). But it's celarly a user errors, so
chaning this to an Enhancement.

-- Jeanfrancois
Comment 2 Steve Kirk 2004-10-12 15:26:08 UTC
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 
Comment 3 Steve Kirk 2004-10-12 15:28:42 UTC
Please delete/ignore my last comment above - I added it to the wrong bug 
report :)
Comment 4 Yoav Shapira 2004-10-25 18:42:47 UTC
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 
Comment 5 Yoav Shapira 2004-10-25 19:02:42 UTC
Done for Tomcat 5.0.30 and 5.5.4.