From jackrabbit-commits-return-1595-apmail-incubator-jackrabbit-commits-archive=www.apache.org@incubator.apache.org Thu Dec 01 10:26:52 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 63467 invoked from network); 1 Dec 2005 10:26:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Dec 2005 10:26:52 -0000 Received: (qmail 50331 invoked by uid 500); 1 Dec 2005 10:26:51 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 50317 invoked by uid 500); 1 Dec 2005 10:26:51 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 50311 invoked by uid 99); 1 Dec 2005 10:26:51 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Dec 2005 02:26:49 -0800 Received: (qmail 63373 invoked by uid 65534); 1 Dec 2005 10:26:29 -0000 Message-ID: <20051201102629.63371.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r350222 - in /incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src: java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java webapp/index.jsp Date: Thu, 01 Dec 2005 10:26:29 -0000 To: jackrabbit-cvs@incubator.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: angela Date: Thu Dec 1 02:26:22 2005 New Revision: 350222 URL: http://svn.apache.org/viewcvs?rev=350222&view=rev Log: simple-server needs workspace name (see changes rev. 331281) -> adjusting index.jsp Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java?rev=350222&r1=350221&r2=350222&view=diff ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java (original) +++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java Thu Dec 1 02:26:22 2005 @@ -34,6 +34,7 @@ import javax.jcr.Repository; import javax.servlet.ServletException; +import javax.servlet.ServletContext; /** * JCRWebdavServerServlet provides request/response handling for the JCRWebdavServer. @@ -48,11 +49,18 @@ /** * Init parameter specifying the prefix used with the resource path. */ - public static final String INIT_PARAM_PREFIX = "resource-path-prefix"; + public static final String INIT_PARAM_RESOURCE_PATH_PREFIX = "resource-path-prefix"; /** the 'missing-auth-mapping' init parameter */ public final static String INIT_PARAM_MISSING_AUTH_MAPPING = "missing-auth-mapping"; + /** + * Servlet context attribute used to store the path prefix instead of + * having a static field with this servlet. The latter causes problems + * when running multiple + */ + public static final String CTX_ATTR_RESOURCE_PATH_PREFIX = "jackrabbit.webdav.jcr.resourcepath"; + private String pathPrefix; private JCRWebdavServer server; private DavResourceFactory resourceFactory; @@ -73,8 +81,9 @@ super.init(); // set resource path prefix - pathPrefix = getInitParameter(INIT_PARAM_PREFIX); - log.debug(INIT_PARAM_PREFIX + " = " + pathPrefix); + pathPrefix = getInitParameter(INIT_PARAM_RESOURCE_PATH_PREFIX); + getServletContext().setAttribute(CTX_ATTR_RESOURCE_PATH_PREFIX, pathPrefix); + log.debug(INIT_PARAM_RESOURCE_PATH_PREFIX + " = " + pathPrefix); txMgr = new TxLockManagerImpl(); subscriptionMgr = new SubscriptionManagerImpl(); @@ -187,5 +196,15 @@ */ public String getAuthenticateHeaderValue() { return DEFAULT_AUTHENTICATE_HEADER; + } + + /** + * Returns the configured path prefix + * + * @return resourcePathPrefix + * @see #INIT_PARAM_RESOURCE_PATH_PREFIX + */ + public static String getPathPrefix(ServletContext ctx) { + return (String) ctx.getAttribute(CTX_ATTR_RESOURCE_PATH_PREFIX); } } Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp?rev=350222&r1=350221&r2=350222&view=diff ============================================================================== --- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp (original) +++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/webapp/index.jsp Thu Dec 1 02:26:22 2005 @@ -1,17 +1,94 @@ <%@ page import="org.apache.jackrabbit.j2ee.SimpleWebdavServlet, javax.jcr.Repository, - org.apache.jackrabbit.j2ee.RepositoryAccessServlet"%><% + org.apache.jackrabbit.j2ee.RepositoryAccessServlet, + org.apache.jackrabbit.j2ee.JCRWebdavServerServlet"%><% %> -Jackrabbit Examples +Jackrabbit JCR-Server Contribution - - + +

JCR-Server Contribution

+

JCR-Server contribution provides 2 views

+

    +
  1. + Filebased View (SimpleWebdavServlet)

    + Filebased ("Simple") WebDAV View to the JSR170 repository.

    + Enter the following URL to your WebDAV client:
    + http://<host>:<port><%= request.getContextPath() %><%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext()) %>/<workspace name>/ +

    +

      +
    • Browser View
    • +
    • Context Path: <%= request.getContextPath() %>
    • +
    • Resource Path Prefix: <%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext()) %>
    • +
    • Workspace Name: see /WEB-INF/repository/repository.xml (Default = 'default')
    • +
    • Source: /contrib/jcr-server/server/webdav/simple
    • +
    +

    +

  2. +
  3. + Item View (JCRServerServlet)

    + Itembased WebDAV View to the JSR170 repository, mapping the functionality + provided by JSR170 to WebDAV, in order to allow remoting of JSR170 via + WebDAV. Some more details regarding remoting are available as initial + draft "JCR_Webdav_Protocol.zip". + In addition the implementation attempts to cover functionality of RFC 2518 and + its extensions wherever possible, namely
    +

    +

    + Enter the following URL to your WebDAV client:
    + http://<host>:<port><%= request.getContextPath() %><%= JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext()) %>/ +

    +

      +
    • Browser View: - Not Available - ("<%= request.getContextPath() %><%= JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext()) %>/")
    • +
    • Context Path: <%= request.getContextPath() %>
    • +
    • Resource Path Prefix: <%= JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext()) %>
    • +
    • Workspace Name: - Not required - (available workspaces are mapped as resources)
    • +
    • Source: /contrib/jcr-server/server/webdav/jcr
    • +
    +
  4. +
+

+

Basic overview

+

    +
  1. webdav module (library only)

    +

      +
    • aim: JSR170 independent WebDAV library
    • +
    • packages: org.apache.jackrabbit.webdav
    • +
    +

    +

  2. +
  3. server module

    +

      +
    • aim: server and server-side WebDAV implementation
    • +
    • packages: +
      - org.apache.jackrabbit.server +
      - org.apache.jackrabbit.server.jcr = jcr-server specific server part +
      - org.apache.jackrabbit.server.io = import/export +
      - org.apache.jackrabbit.webdav.simple = simple (filebased) webdav implementation +
      - org.apache.jackrabbit.webdav.jcr = jcr-server (itembased) webdav implementation +
    • +
    +

    +

  4. +
  5. webapp module (jackrabbit-server)

    +

      +
    • aim: contains the webapp
    • +
    • packages: org.apache.jackrabbit.j2ee (servlets)
    • +
    +

    +

  6. +
  7. client module

    +

      +
    • aim: provide jcr-client and WebDAV transport layer for the client
    • +
    • packages: - Not Available -
    • +
    +
  8. +
<% Repository rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());