You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2007/02/10 01:08:08 UTC
svn commit: r505576 - in
/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher:
Cli.java helper/ContractHelperStAX.java
helper/DispatcherPropertiesHelper.java helper/StructurerHelperStAX.java
Author: rgardler
Date: Fri Feb 9 16:08:07 2007
New Revision: 505576
URL: http://svn.apache.org/viewvc?view=rev&rev=505576
Log:
Windows requires a leading slash in file urls, I'm pretty sure this works on Linux too, but have not tested - please do so.
Modified:
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/ContractHelperStAX.java
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/DispatcherPropertiesHelper.java
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/StructurerHelperStAX.java
Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java?view=diff&rev=505576&r1=505575&r2=505576
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java (original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java Fri Feb 9 16:08:07 2007
@@ -40,7 +40,7 @@
propertiesHelper = new DispatcherPropertiesHelper(home);
String sourceUrl;
try {
- sourceUrl = propertiesHelper.getMasterStructurerUrl().replace("file://", "");
+ sourceUrl = propertiesHelper.getMasterStructurerUrl().replace("file:///", "");
System.out.println("sourceUrl "+sourceUrl);
StructurerHelperStAX helper = new StructurerHelperStAX(home);
File result = helper.execute(sourceUrl, "html");
Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/ContractHelperStAX.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/ContractHelperStAX.java?view=diff&rev=505576&r1=505575&r2=505576
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/ContractHelperStAX.java (original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/ContractHelperStAX.java Fri Feb 9 16:08:07 2007
@@ -127,7 +127,7 @@
// here we need to inject the dataUri or foo
if (!dataFile.isFile()) {
// no dataFile defined trying cache for foo
- dataFile = new File(propertiesHelper.getMasterFooUrl().replace("file://", ""));
+ dataFile = new File(propertiesHelper.getMasterFooUrl().replace("file:///", ""));
if (!dataFile.isFile()) {
// not in cache either, so we create it and
// store it in cache
@@ -203,7 +203,7 @@
if (sourceUrl.indexOf(":/") > -1)
contractUrl = new URL(sourceUrl);
else
- contractUrl = new URL("file://" + sourceUrl);
+ contractUrl = new URL("file:///" + sourceUrl);
InputStream in = contractUrl.openStream();
inputFactory.setEventAllocator(new XMLEventAllocatorBase());
XMLEventAllocator allocator = inputFactory.getEventAllocator();
Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/DispatcherPropertiesHelper.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/DispatcherPropertiesHelper.java?view=diff&rev=505576&r1=505575&r2=505576
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/DispatcherPropertiesHelper.java (original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/DispatcherPropertiesHelper.java Fri Feb 9 16:08:07 2007
@@ -39,21 +39,21 @@
public final String MASTER_CONTRACT = "master.contract.xml";
public String getMasterContractUrl() {
- String url = "file://" + contractRep + MASTER_CONTRACT;
+ String url = "file:///" + contractRep + MASTER_CONTRACT;
return url;
}
public final String MASTER_STRUCTURER = "master.structurer.xml";
public String getMasterStructurerUrl() {
- String url = "file://" + structurerRep + MASTER_STRUCTURER;
+ String url = "file:///" + structurerRep + MASTER_STRUCTURER;
return url;
}
public final String MASTER_FOO = "foo.xml";
public String getMasterFooUrl() {
- String url = "file://" + cacheHome + MASTER_FOO;
+ String url = "file:///" + cacheHome + MASTER_FOO;
return url;
}
Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/StructurerHelperStAX.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/StructurerHelperStAX.java?view=diff&rev=505576&r1=505575&r2=505576
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/StructurerHelperStAX.java (original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/helper/StructurerHelperStAX.java Fri Feb 9 16:08:07 2007
@@ -143,7 +143,7 @@
if (sourceUrl.indexOf(":/") > -1)
structurerUrl = new URL(sourceUrl);
else
- structurerUrl = new URL("file://" + sourceUrl);
+ structurerUrl = new URL("file:///" + sourceUrl);
InputStream in = structurerUrl.openStream();
inputFactory.setEventAllocator(new XMLEventAllocatorBase());
allocator = inputFactory.getEventAllocator();