cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r471182 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
Date Sat, 04 Nov 2006 13:31:30 GMT
Author: lgawron
Date: Sat Nov  4 05:31:29 2006
New Revision: 471182

URL: http://svn.apache.org/viewvc?view=rev&rev=471182
Log:
DeploymentUtil in non servlet env.

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java?view=diff&rev=471182&r1=471181&r2=471182
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
Sat Nov  4 05:31:29 2006
@@ -29,7 +29,6 @@
 
 import javax.servlet.ServletContext;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -49,6 +48,12 @@
     protected final String destinationDirectory;
 
     public DeploymentUtil(ServletContext servletContext) {
+        // TODO how do we handle non servlet container environment?
+        if ( servletContext == null ) {
+            this.destinationDirectory = null;
+            return;
+        }
+        
         final String pathToWebInf = servletContext.getRealPath("/WEB-INF");
         if ( pathToWebInf == null ) {
             // we run unexpanded



Mime
View raw message