Hi Alexander, is there any place where i can get examples of that code? i'm reading the specs now, but i think we lack some good examples of the client side, or i'm probably looking in the wrong place.
thanks a lot for helping, paulo f. On Fri, Jun 20, 2008 at 9:13 PM, Alexander Klimetschek <[EMAIL PROTECTED]> wrote: > 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] >
