Hi Sergio, you have to use a specific node structure and node types for storing files in the repository. The JCR specification [1] defines the standard types "nt:folder" and "nt:file" for this use case (see section 6.7.22.5 nt:hierarchyNode and ff.). The jackrabbit WebDAV server uses those to map files and folders naturally.
Regards, Alex [1] http://jcp.org/en/jsr/detail?id=170 On Fri, Jun 20, 2008 at 8:31 PM, Paulo Sergio <[EMAIL PROTECTED]> wrote: > Hi everyone, > i'm new to Jackrabit and jcr in general, and i'm playing a bit with it and > i'm already amazed about what it can do :). > Anyway, currently i'm able to mount the repository as a webdav folder and > copy/paste files from/to it, now i would like to build a simpe software to > upload files to it, using this code : > Node root = session.getRootNode(); > File file = new File("/home/sergio/teste.log"); > Node hello = root.addNode("hello"); > Node world = hello.addNode("world"); > world.setProperty("file", new FileInputStream(file)); > session.save(); > // Retrieve content > Node node = root.getNode("hello/world"); > System.out.println(node.getPath()); > System.out.println(node.getProperty("file").getString()); > > i was able to store and retreive the file but i can't see it in the webdav > folder... > am i doing something wrong? or the repositories are in fact diferent due to > content ? (i just create one repository named teste but in order to mount it > i use: "http://localhost:8080/jackrabbit-webapp-1.4/repository/default" ) > > thanks in advance, > paulo f. > -- Alexander Klimetschek [EMAIL PROTECTED]
