/**
* Return the XML root for this Host. This can be an absolute
* pathname, a relative pathname, or a URL.
- * If null, defaults to ${catalina.base}/conf/ directory
+ * If null, defaults to
+ * ${catalina.base}/conf/<engine name>/<host name> directory
*/
public String getXmlBase();
/**
* Set the Xml root for this Host. This can be an absolute
* pathname, a relative pathname, or a URL.
- * If null, defaults to ${catalina.base}/conf/ directory
- *
+ * If null, defaults to
+ * ${catalina.base}/conf/<engine name>/<host name> directory
* @param xmlBase The new XML root
*/
public void setXmlBase(String xmlBase);
setUnpackWARs(((StandardHost) host).isUnpackWARs());
setXmlNamespaceAware(((StandardHost) host).getXmlNamespaceAware());
setXmlValidation(((StandardHost) host).getXmlValidation());
- if (((StandardHost) host).getXmlBase()!=null) {
-
- }
}
} catch (ClassCastException e) {
log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e);
if (host.getXmlBase()!=null) {
configBase = returnCanonicalPath(host.getXmlBase());
} else {
- configBase = returnCanonicalPath("conf");
+ StringBuffer xmlDir = new StringBuffer("conf");
+ Container parent = host.getParent();
+ if (parent instanceof Engine) {
+ xmlDir.append('/');
+ xmlDir.append(parent.getName());
+ }
+ xmlDir.append('/');
+ xmlDir.append(host.getName());
+ configBase = returnCanonicalPath(xmlDir.toString());
}
return (configBase);