jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
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 GMT
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"%><%
 %><html>
 <head>
-<title>Jackrabbit Examples</title>
+<title>Jackrabbit JCR-Server Contribution</title>
 </head>
-<body>
-<ul>
-<li><a href="<%= request.getContextPath() %><%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext())
%>/">Repository Browser</a></li>
-<%--
-<li><a href="<%= request.getContextPath() %>/example.jsp">Repository Servlet
Example</a></li>
---%>
-</ul>
+<body style="font-family:monospace">
+<h1>JCR-Server Contribution</h1>
+<h3>JCR-Server contribution provides 2 views</h3><p/>
+<ol>
+    <li>
+        <b>Filebased View</b> (SimpleWebdavServlet)<p/>
+        Filebased ("Simple") WebDAV View to the JSR170 repository.<p/>
+        Enter the following URL to your WebDAV client:<br>
+        http://&lt;<i>host</i>&gt;:&lt;<i>port</i>&gt;<%=
request.getContextPath() %><%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext())
%>/&lt;<i>workspace name</i>&gt;/
+        <p/>
+        <ul>
+            <li><a href="<%= request.getContextPath() %><%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext())
%>/default/">Browser View</a></li>
+            <li>Context Path: <%= request.getContextPath() %></li>
+            <li>Resource Path Prefix: <%= SimpleWebdavServlet.getPathPrefix(pageContext.getServletContext())
%></li>
+            <li>Workspace Name: see /WEB-INF/repository/repository.xml (Default = 'default')</li>
+            <li>Source: /contrib/jcr-server/server/webdav/simple</li>
+        </ul>
+        <p/>
+    </li>
+    <li>
+        <b>Item View</b> (JCRServerServlet)<p/>
+        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 "<a href="http://www.day.com/jsr170/server/JCR_Webdav_Protocol.zip">JCR_Webdav_Protocol.zip</a>".
+        In addition the implementation attempts to cover functionality of RFC 2518 and
+        its extensions wherever possible, namely<br>
+        <ul>
+            <li><a href="http://www.ietf.org/rfc/rfc2518.txt">RFC 2518 (WebDAV
1,2)</a></li>
+            <li><a href="http://www.ietf.org/rfc/rfc3253.txt">RFC 3253 (DeltaV)</a></li>
+            <li><a href="http://www.ietf.org/rfc/rfc3648.txt">RFC 3648 (Ordering)</a></li>
+            <li><a href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-search-latest.html#rfc.section.1.5">Internet
Draft WebDAV Search</a>.</li>
+        </ul>
+        <p/>
+        Enter the following URL to your WebDAV client:<br>
+        http://&lt;<i>host</i>&gt;:&lt;<i>port</i>&gt;<%=
request.getContextPath() %><%= JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext())
%>/
+        <p/>
+        <ul>
+            <li>Browser View: - Not Available - ("<%= request.getContextPath() %><%=
JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext()) %>/")</li>
+            <li>Context Path: <%= request.getContextPath() %></li>
+            <li>Resource Path Prefix: <%= JCRWebdavServerServlet.getPathPrefix(pageContext.getServletContext())
%></li>
+            <li>Workspace Name: - Not required - (available workspaces are mapped as
resources)</li>
+            <li>Source: /contrib/jcr-server/server/webdav/jcr</li>
+        </ul>
+    </li>
+</ol>
+<p/><p/>
+<h3>Basic overview</h3><p/>
+<ol>
+    <li><b>webdav module</b> (library only)<p/>
+      <ul>
+          <li>aim: JSR170 independent WebDAV library</li>
+          <li>packages: org.apache.jackrabbit.webdav</li>
+      </ul>
+      <p/>
+    </li>
+    <li><b>server module</b><p/>
+      <ul>
+          <li>aim: server and server-side WebDAV implementation</li>
+          <li>packages:
+              <br>- org.apache.jackrabbit.server
+              <br>- org.apache.jackrabbit.server.jcr = jcr-server specific server part
+              <br>- org.apache.jackrabbit.server.io  = import/export
+              <br>- org.apache.jackrabbit.webdav.simple = simple (filebased) webdav
implementation
+              <br>- org.apache.jackrabbit.webdav.jcr = jcr-server (itembased) webdav
implementation
+          </li>
+      </ul>
+      <p/>
+    </li>
+    <li><b>webapp module</b> (jackrabbit-server)<p/>
+      <ul>
+          <li>aim: contains the webapp</li>
+          <li>packages: org.apache.jackrabbit.j2ee (servlets)</li>
+      </ul>
+      <p/>
+    </li>
+    <li><b>client module</b><p/>
+      <ul>
+          <li>aim: provide jcr-client and WebDAV transport layer for the client</li>
+          <li>packages: - Not Available -</li>
+      </ul>
+    </li>
+</ol>
 <%
     Repository rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());
 



Mime
View raw message