cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r230556 - /cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java
Date Sat, 06 Aug 2005 17:28:48 GMT
Author: cziegeler
Date: Sat Aug  6 10:28:28 2005
New Revision: 230556

URL: http://svn.apache.org/viewcvs?rev=230556&view=rev
Log:
Correct context url for cli

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java?rev=230556&r1=230555&r2=230556&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java Sat Aug  6 10:28:28 2005
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -697,7 +698,11 @@
          * @see org.apache.cocoon.core.BootstrapEnvironment#getContextURL()
          */
         public String getContextURL() {
-            return this.contextDirectory;
+            try {
+                return new File(this.contextDirectory).toURL().toExternalForm();
+            } catch (MalformedURLException mue) {
+                return "file://" + this.contextDirectory;
+            }
         }
 
         /**



Mime
View raw message