2
votes

When I start a Jackrabbit 2 repository, I can just connect to it via WebDAV easily via http://localhost:8080/repository/default

This does not work with Oak though.

Unfortunately it is not well documents and all I could find, which is Oak & WebDAV-related, were these tickets in Jira

and the mailing list post

which did not give me any useful hint.

So my questions are actually two questions:

1) How to connect to an Oak repository via WebDAV which runs standalone?

2) How to connect to an Oak repository via WebDAV which is created/embedded in an application? How to expose the port and how to enable WebDAV?

Are there any code samples anywhere? The documentation is not really helpful enough.

I checked the Oak repository and found the oak-examples with a standalone application and a README at https://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-examples/standalone/README.md.

It says:

Once done you can run the application by executing

$ java -jar target/oak-standalone-*.jar
 This would start an Oak based repository which uses filesystem storage. All  the content would be by default stored under `oak`

folder. The server would listen at port 8080 and support remote access via DavEx (at /server) and WebDAV (at /repository).

However, this does not work. When trying to connect to http://localhost:8080/repository with my WebDav client or in the browser, I get a 404 not found error.

1

1 Answers

2
votes

I was missing the workspace name (default) in the URL.

Following the instructions on https://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-examples/standalone/README.md and then starting the repository via

java -jar target/oak-standalone-*.jar

I can access it via WebDav at http://localhost:8080/repository/default/. I missed to put the /default in the URL.