tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Rehman <jreh...@citysearch.com>
Subject Re: Tomcat Loads Deleted Context?
Date Thu, 05 Feb 2004 18:46:45 GMT
Shapira, Yoav wrote:

>Howdy,
>
>  
>
>>I don't think Remy's suggestion above is unreasonable -- AS LONG AS
>>IT'S DOCUMENTED (sorry for shouting).  Especially if it's as simple as
>>adding a few lines in server.xml.  (Well, it would be nice if it were
>>added to the server configuration documentation as well.)
>>    
>>
>
>Added to Context configuration documentation.  Added to Tomcat FAQ
>(deployment page).  And Remy just beat me to removing the <Context>
>example altogether (as opposed to commenting it out as it has been) from
>server.xml.
>
>  
>

Thanks. BTW, why can't server.xml be reloaded?  Here's part of your commit:

     <p>You may define as many <strong>Context</strong> elements as you
  -  wish, nested within a <a href="host.html">Host</a> element in
  -  <code>conf/server.xml</code>.  Each such Context MUST have a unique
  +  wish.  Each such Context MUST have a unique
     context path, which is defined by the <code>path</code> attribute.
     In addition, you MUST define a Context with a context path equal to
     a zero-length string.  This Context becomes the <em>default</em>
  @@ -53,7 +52,9 @@
     Application Deployment</a> for more information. This method allows dynamic
     reconfiguration of the web application, since the main 
     <code>conf/server.xml</code> file cannot be reloaded without restarting
  -  Tomcat.</p>
  +  Tomcat. <b>Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT
  +  recommended to place <Context> elements directory in the server.xml file.</b>
  +  </p>

note that "directory" is should be "directly". It might also be clearer 
about *where* context elts should be placed.

Again, I think this is a bad way to configure software. "Everything in 
one place" is the quite reasonable mantra espoused in _The Practical 
Programmer_ among other places, not to mention I've had success with it 
as a rule of thumb. Logically, I want to see all contexts in one place. 
Moving that responsibility to the manager app doesn't count as "one 
place" because then I have to be pointing and clicking everywhere. I 
should be able to use vi to manage my server with one file. The apache 
web server has been doing it this way for a long, long time and it seems 
to work pretty well. I work alongside Perl and Apache folk, and I can 
hear their sniggers when I tell them I have to navigate a directory tree 
to modify a context...and they'd be right!

Perhaps there is some technical limitation to reloading server.xml. but 
I can't see it. Remy has said it's a "hack" but of course that doesn't 
really say anything. You are just trading one hierarchical data 
structure for another (directories for nested XML elts).

(I am looking into this but I can't get tomcat built, and no-one on the 
dev list has replied to my build questions yet. When I have more time 
tonight I'll try again.)

Thanks


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


Mime
View raw message