cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject directorygenerator for a shared drive
Date Mon, 20 Oct 2003 13:54:00 GMT
Hi,

I am trying to generate a directory listing of a directory on a shared 
drive (windows) without success.

<map:generate type="directory" src="z:\temp"/>

Looking at the source in DirectoryGenerator it's easy to see where the 
error comes from

            inputSource = this.resolver.resolve(directory);
            String systemId = inputSource.getSystemId();
            if (!systemId.startsWith(FILE)) {
              throw new ResourceNotFoundException(systemId + " does not 
denote a directory");
            }
            // This relies on systemId being of the form "file://..."
            File directoryFile = new File(new URL(systemId).getFile());
            if (!directoryFile.isDirectory()) {
-->                throw new ResourceNotFoundException(directory + " is 
not a directory.");
            }

Something in this "systemid" (and thus in resolver.resolve()) is 
throwing the File object off course, because the following works:

File directoryFile = new File("z:\\temp\\");
if (!directoryFile.isDirectory()) {
    System.out.println("not a directory");
}

Any thoughts on this? Tomcat is started as a system user with rights to 
the share (and i know that works because in java-code the access is fine)

Regards
Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message