> From: Alan Burlison [mailto:[EMAIL PROTECTED] > Subject: Re: Changing defaultHost from localhost to a FQDN > > Ah, and I'm using 5.5. I've checked the 5.5 docs and I can't find > *any* of those restrictions mentioned, other than a recommendation > that <Context> elements aren't placed in server.xml, but I got the > impression that this was advisory, not mandatory.
The 5.0 and 5.5 docs are mild upgrades of the 4.1 versions, and some areas did not get revised as much as they should have. 5.5 especially seems to be stricter on use of unnecessary attributes when the <Context> element is not in server.xml; what I posted has been gleaned from experience. For compatibility, you can still place <Context> elements in server.xml, but it's strongly discouraged, since it requires a Tomcat restart to make any changes. > So how *should* I do what I want, i.e. deploy the app in a directory > called meshcms under webapps, or am I forced to name it ROOT if I want > it to be the default application? The current philosophy is that the default app must be named ROOT. There are three ways to achieve this: 1) Deploy the app in the ROOT subdirectory of the <Host>'s appBase directory, removing any ROOT.war file if it exists. 2) Deploy the packaged app as ROOT.war in the <Host>'s appBase directory, removing the ROOT subdirectory if it exists. 3) Deploy the app outside of the <Host>'s appBase directory, and place a ROOT.xml file in conf/[engine]/[host]. The ROOT.xml file must contain a <Context> element with a docBase attribute pointing to the location of the app. Note that in the first two cases, you often do not need any <Context> element for the app. If you do require one (e.g., to configure the app as privileged), place the element and attributes in META-INF/context.xml inside the app directory structure. Alternatively, you may place the <Context> element in conf/[engine]/[host]/[appname].xml, but without the docBase attribute. If you place a <Context> element with a docBase attribute in conf/[engine]/[host]/[somefile].xml and put the app under the <Host>'s appBase directory using a name other than [somefile], you will get the app deployed twice - once as the .xml file name, once as the subdirectory or .war file name under appBase. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]