tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Configure read/write-access in TomCat
Date Wed, 18 Aug 2010 17:57:33 GMT
Comments at end.

Caldarale, Charles R wrote:
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Subject: Re: Configure read/write-access in TomCat
>>
>> Would you gurus mind pointing out where exactly ?
> 
> Not sure what you want pointed out.
> 
>> I am looking at the online documentation of Tomcat 7, at
>> http://tomcat.apache.org/tomcat-7.0-doc/index.html,
>> and not finding it.
> 
> What is "it"?
> 
>> I am also having trouble finding it in the Servlet Specifications v 3.0
>> (I mean specifically where it says that the "default" web.xml is being
>> merged with the application-specific web.xml.)
> 
> That won't be in the spec - it's a characteristic of Tomcat.  Other containers operate
differently.
> 
>> If you refer to the content itself of the conf/web.xml file
> 
> That's what Pid was talking about.
> 
>> here is all it has to say :
>>
>> This document defines default values for *all* web applications
>> loaded into this instance of Tomcat.  As each application is
>> deployed, this file is processed, followed by the
>> "/WEB-INF/web.xml" deployment descriptor from your own
>> applications.
> 
> That's the key information.
> 
>> For example, it does not clearly speak of merging, nor in case
>> of merge which possibly overlapping or conflicting directive has
>> precedence (one wopuld presume the webapp, but then presumptions 
>> are sometimes misleading).
> 
> Yes, the settings in the webapp's WEB-INF/web.xml override those in the global.  I can't
find any explicit statement to that effect either, but that is how it works.
> 

Ok, can I then summarise this by now slightly but not quite off-topic series of messages 
by saying that, contrary to what some previous answers would imply, the process by which 
Tomcat, for each deplayed webapp, first reads and "processes" the conf/web.xml, then reads

and "processes" the applications WEB-INF/web.xml, and then "merges" both according to some

internal logic, is specific to Tomcat, and is NOT very well documented at present in the 
on-line documentation ?

...
 >
 > Do you know anyone who actually likes to write documentation?
 >
Well actually I do.
But it this case, I have a number of impediments :
- I do not know enough of Tomcat and even Java to write something coherent and correct
- I find the process of contributing Tomcat documentation changes rather overwhelming, 
technically speaking.
(Which I guess explains also why not many other people feel like correcting the docs.)

But let's suppose that I would try to write a summary of this process.  Where would it fit

  in the documentation ?
And whereabout would I find the original Tomcat code which does this, on the off-chance I

might actually understand it enough to write something not totally wrong ?

Or, might the process better be described as :

As Tomcat deploys each web application, it first installs the default servlet and its 
associated web.xml descriptor CATALINA_BASE/conf/web.xml for this web application, then it

overrides this setup by any servlets and descriptor (application/WEB-INF/web.xml) provided

by the application itself (if any).  In case of overlapping or conflicting settings, the 
web application specific settings have precedence.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message