Search in sources :

Example 1 with SimpleWebdavServlet

use of org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet in project jackrabbit-oak by apache.

the class RemotingInitializer method webDavServlet.

@Bean
public ServletRegistrationBean webDavServlet() {
    ServletRegistrationBean bean = new ServletRegistrationBean(new SimpleWebdavServlet() {

        @Override
        public Repository getRepository() {
            return repository;
        }

        @Override
        public ServletContext getServletContext() {
            return RemotingInitializer.this.getServletContext();
        }
    }, "/repository/*");
    bean.addInitParameter(SimpleWebdavServlet.INIT_PARAM_RESOURCE_PATH_PREFIX, "/repository");
    bean.addInitParameter(SimpleWebdavServlet.INIT_PARAM_RESOURCE_CONFIG, "/remoting/webdav-config.xml");
    return bean;
}
Also used : Repository(javax.jcr.Repository) ServletRegistrationBean(org.springframework.boot.context.embedded.ServletRegistrationBean) SimpleWebdavServlet(org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet) ServletContext(javax.servlet.ServletContext) ServletRegistrationBean(org.springframework.boot.context.embedded.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

Repository (javax.jcr.Repository)1 ServletContext (javax.servlet.ServletContext)1 SimpleWebdavServlet (org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet)1 ServletRegistrationBean (org.springframework.boot.context.embedded.ServletRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1