tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r752936 - in /tomcat/trunk/java/org/apache/catalina: Host.java startup/HostConfig.java
Date Thu, 12 Mar 2009 17:02:28 GMT
Author: markt
Date: Thu Mar 12 17:02:27 2009
New Revision: 752936

URL: http://svn.apache.org/viewvc?rev=752936&view=rev
Log:
Change default xmlBase to prevent exceptions on start up and errors every time the background
thread checks for descriptors.
Remove unused code block.

Modified:
    tomcat/trunk/java/org/apache/catalina/Host.java
    tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/Host.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Host.java?rev=752936&r1=752935&r2=752936&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Host.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Host.java Thu Mar 12 17:02:27 2009
@@ -70,15 +70,16 @@
     /**
      * 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);

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=752936&r1=752935&r2=752936&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Thu Mar 12 17:02:27 2009
@@ -304,9 +304,6 @@
                 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);
@@ -439,7 +436,15 @@
         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);
 



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


Mime
View raw message