> From: Frank Burns [mailto:francisbu...@gmail.com]
> Subject: Re: Web app using JDBCRealm runs on Tomcat 5.5.20 but will not
> run on Tomcat 6.0.26 ...
> 
> didn't realise that specifying the context in the server.xml
> was poor practice and that if you did so then you had to be
> careful.
> 
> Can you tell me why that is?

Placing the <Context> element in server.xml requires a Tomcat restart anytime 
the context attributes need to be changed (including those of nested elements), 
since server.xml is only read when Tomcat starts.  Especially when running 
multiple webapps, this can be an administrative nightmare.  Keeping the 
<Context> element with the webapp avoids that issue, and makes the URI path of 
the webapp independent of the <Context> settings.

Having the <Context> in server.xml also runs the risk of double deployment, 
which can occur when the path attribute doesn't exactly match the file system 
location of the webapp.  People often don't even recognize that they've got a 
second copy of the webapp running, consuming resources and providing an 
unexpected path into the server.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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

Reply via email to