tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Jiricka <>
Subject RE: FW: two different versions of web.dtd and other issues
Date Fri, 04 Aug 2000 16:40:22 GMT

> > I noticed that there are two different versions of web.dtd 
> all over Tomcat
> > source/build/dist directories: one of size 16039 seems to 
> be included in
> > Tomcat code, the other of size 15911 seems to be included in user
> > directories. Can you please explain what's the difference 
> and what has
> > changed ?
> I don't know why they are different.
> org/apache/tomcat/resources/web.dtd is read to validate 
> web.xml files. It has
> no other role in tomcat configuration.
> conf/web.dtd is not used by tomcat - I haven't removed it 
> because maybe users
> want to read it or use (possible) xml editors and they may 
> need the DTD.
> It was supposed to be "constant" - i.e. the one defined in 
> the spec ( in
> general DTDs are not supposed to change without a different 
> URI and version).
> It seems this one is not so constant :-)

Well, that happens, I guess. Servlet API classes are not so constant either
(I remember a change just after the 3.1 release). I think I'll just use the
version from org/apache/tomcat/resources/web.dtd.

> > Another issue: I heard that conf/web.xml is not used now as 
> a default
> > web.xml. What's the status of this file ? Is it *ever* used 
> ? Or is it
> > something like "it is only used if ...." ? Either way, it 
> seems broken
> > anyhow, as "org.apache.jasper.runtime.JspServlet" is out of 
> date, now it
> > should be org.apache.jasper.servlet.JspServlet. Shouldn't 
> conf/web.xml be
> > removed ?
> No, it is not used. The code was quite complex ( some properties were
> overriden, some appened ). Until we have something we can 
> understand I think
> it's better to leave it commented ( the code is still there). 
> Also, it is much
> better to have only one config file - server.xml.

Thanks, that's what I needed to know. Another - related - question: is the
user *required* to have a web.xml for each web app, or is it optional ? I am
assuming it is meant to be optional - see the bugfix I just commited.

> All configuration is done now in server.xml. Some of the 
> things from web.xml (
> mime types ) are now hardcoded ( but it is easy to enhance 
> server.xml to add
> new defaults).
> Jasper is hardcoded, but you can use the app. web.xml if you 
> want to change
> it, and server.xml will also allow this.

That's exactly what I wanted to do - replace the default JspServlet by our
enhanced version. I don't want to modify web.xml for each web app, I want to
somehow set it "globally" using server.xml. So I thought the solution would
be to have a context interceptor which adds a ServletWrapper and mapping.
Now, the default JspServlet is set by WebXMLInterceptor - is it possible to
somehow override these settings ? Do I need to put my interceptor before of
after WebXMLInterceptor ?


> Costin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message