jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@apache.org>
Subject simple webdav servlet
Date Sun, 04 Jan 2009 17:07:21 GMT
I was trying to expose a repository via webdav

    public final class WebdavServlet extends
      org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet {

    	private Repository repository;
	
    	private File repositoryHome = new File("/path/to/repo");
	
    	public Repository getRepository() {
		
    		if (repository == null) {
    			try {
    				repository = new TransientRepository(
    				  "path/to/repository.xml",
    				  repositoryHome.getAbsolutePath()
    				);
    			} catch (IOException e) {
    			    e.printStackTrace();
    			}
    		}
		
    		return repository;
    	}
    }

The servlet and repo seems to start up just fine. But when accessing it at

 http://localhost:8080/webdav/repository/default

(mapped as /webdav/*) all I get is

<?xml version="1.0" encoding="UTF-8"?>
<D:error xmlns:D="DAV:">
<dcr:exception xmlns:dcr="http://www.day.com/jcr/webdav/1.0">
<dcr:class>javax.jcr.NoSuchWorkspaceException</dcr:class>
<dcr:message>webdav</dcr:message></dcr:exception>
</D:error>

In my testcases I never had to create a workspace myself and it just
worked with the following settings:

    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>

    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
          <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
          <param name="schemaObjectPrefix" value="${wsp.name}_"/>
        </PersistenceManager>
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

Any pointers? (I am using 1.5)

cheers
--
Torsten

Mime
View raw message