You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joe Lam <jo...@moni-media.net> on 2009/06/18 06:31:04 UTC

override context defined in server.xml doesn't work !?!

the tomcat is v5.5

I'm trying to override the <Context> in server.xml (coz cpanel creates a
default "blank" context for new vhost in server.xml, and we shouldn't edit
the server.xml coz cpanel will update it whenever it wants)

I created "conf/Catalina/serverName/ROOT.xml" with <Context override="true">
but it doesn't work.
the ROOT.xml should be fine. because when I remove the new vhost's <Context>
in server.xml. it works.

I wonder how does the "override=true" works ???

Please help. thanks 

Joe
-- 
View this message in context: http://www.nabble.com/override-context-defined-in-server.xml-doesn%27t-work-%21-%21-tp24086230p24086230.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: override context defined in server.xml doesn't work !?!

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Joe Lam [mailto:joe.lam@moni-media.net]
> Subject: override context defined in server.xml doesn't work !?!
> 
> I'm trying to override the <Context> in server.xml (coz 
> cpanel creates a default "blank" context for new vhost
> in server.xml, and we shouldn't edit the server.xml coz
> cpanel will update it whenever it wants)

AFAIK, you can't override <Context> elements in server.xml.  You need to complain bitterly to cPanel, since what they're doing is specifically discouraged in the Tomcat doc; it's truly inappropriate behavior to do that to any reasonably modern version of Tomcat.

> I wonder how does the "override=true" works ???

The override attribute only affects attributes specified in the global conf/context.xml or conf/[enginename]/[hostname]/context.xml.default; the former is shared by all webapps, the latter by all webapps of the given <Host>.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org