Bug 31671 - web.xml files are mix of 2.3 and 2.4 DTD
Summary: web.xml files are mix of 2.3 and 2.4 DTD
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.28
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-12 14:51 UTC by Steve Kirk
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

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 
problem.
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 
considered.
Comment 5 Yoav Shapira 2004-10-25 19:02:42 UTC
Done for Tomcat 5.0.30 and 5.5.4.