tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r378292 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup: ContextConfig.java HostConfig.java
Date Thu, 16 Feb 2006 16:34:26 GMT
Author: remm
Date: Thu Feb 16 08:34:08 2006
New Revision: 378292

URL: http://svn.apache.org/viewcvs?rev=378292&view=rev
Log:
- Return an error (other than a NPE) if a context file doesn't contain any Context element.
- Deploy folders which don't have a WEB-INF.
- No info message when a webapp doesn't have a web.xml.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=378292&r1=378291&r2=378292&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Thu Feb 16 08:34:08 2006
@@ -314,7 +314,9 @@
             }
         }
         if (stream == null) {
-            log.info(sm.getString("contextConfig.applicationMissing") + " " + context);
+            if (log.isDebugEnabled()) {
+                log.debug(sm.getString("contextConfig.applicationMissing") + " " + context);
+            }
             return;
         }
         

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?rev=378292&r1=378291&r2=378292&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
Thu Feb 16 08:34:08 2006
@@ -563,6 +563,11 @@
             synchronized (digester) {
                 try {
                     context = (Context) digester.parse(contextXml);
+                    if (context == null) {
+                        log.error(sm.getString("hostConfig.deployDescriptor.error",
+                                file));
+                        return;
+                    }
                 } finally {
                     digester.reset();
                 }
@@ -851,15 +856,6 @@
             File dir = new File(appBase, files[i]);
             if (dir.isDirectory()) {
 
-                // Make sure there is an application configuration directory
-                // This is needed if the Context appBase is the same as the
-                // web server document root to make sure only web applications
-                // are deployed and not directories for web space.
-                File webInf = new File(dir, "/WEB-INF");
-                if (!webInf.exists() || !webInf.isDirectory() ||
-                    !webInf.canRead())
-                    continue;
-
                 // Calculate the context path and make sure it is unique
                 String contextPath = "/" + files[i];
                 if (files[i].equals("ROOT"))
@@ -868,9 +864,7 @@
                 if (isServiced(contextPath))
                     continue;
 
-                String file = files[i];
-                
-                deployDirectory(contextPath, dir, file);
+                deployDirectory(contextPath, dir, files[i]);
             
             }
 



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


Mime
View raw message