You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2008/01/11 12:06:18 UTC

svn commit: r611140 - in /jackrabbit/branches/1.4: ./ jackrabbit-webapp/ jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/ jackrabbit-webapp/src/main/webapp/ jackrabbit-webapp/src/main/webapp/WEB-INF/

Author: jukka
Date: Fri Jan 11 03:06:13 2008
New Revision: 611140

URL: http://svn.apache.org/viewvc?rev=611140&view=rev
Log:
1.4: Merged revision 611136 (JCR-1220)

Added:
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/local.jsp
      - copied unchanged from r611136, jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/local.jsp
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/remote.jsp
      - copied unchanged from r611136, jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/remote.jsp
Modified:
    jackrabbit/branches/1.4/RELEASE-NOTES.txt
    jackrabbit/branches/1.4/jackrabbit-webapp/pom.xml
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/header.jsp
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/webdav-simple.jsp
    jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/welcome.jsp

Modified: jackrabbit/branches/1.4/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/RELEASE-NOTES.txt?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/RELEASE-NOTES.txt (original)
+++ jackrabbit/branches/1.4/RELEASE-NOTES.txt Fri Jan 11 03:06:13 2008
@@ -637,6 +637,7 @@
   [JCR-1016] [PATCH] Allow RepositoryAccessServlet to get the Repository ...
   [JCR-1193] war missing jcr jar
   [JCR-1210] WebDAV: pack AbstractWebdavServlet with the ...
+  [JCR-1220] WebApp: Ease first access for new users looking for a WebDAV ...
   [JCR-1268] Move JCRWebdavServerServlet to jcr-server and make it abstract
   [JCR-1283] Use bundle persistence in default configuration
   [JCR-1287] jackrabbit-webapp facelift

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/pom.xml?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/pom.xml (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/pom.xml Fri Jan 11 03:06:13 2008
@@ -72,6 +72,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-servlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-jcr-rmi</artifactId>
     </dependency>
     <dependency>

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java Fri Jan 11 03:06:13 2008
@@ -17,10 +17,12 @@
 package org.apache.jackrabbit.j2ee;
 
 import org.apache.jackrabbit.api.JackrabbitRepository;
+import org.apache.jackrabbit.commons.repository.RepositoryFactory;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.rmi.jackrabbit.JackrabbitServerAdapterFactory;
 import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory;
+import org.apache.jackrabbit.servlet.AbstractRepositoryServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
@@ -48,7 +50,6 @@
 import javax.naming.NamingException;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -142,7 +143,7 @@
  * a new (or existing) repository home and will copy the templates of the
  * repository.xml and bootstrap.properties to the respective location.
  */
-public class RepositoryStartupServlet extends HttpServlet {
+public class RepositoryStartupServlet extends AbstractRepositoryServlet {
 
     /**
      * the default logger
@@ -289,6 +290,25 @@
      */
     public Repository getRepository() {
         return repository;
+    }
+
+    /**
+     * Returns a repository factory that returns the repository if available
+     * or throws an exception if not.
+     *
+     * @return repository factory
+     */
+    public RepositoryFactory getRepositoryFactory() {
+        return new RepositoryFactory() {
+            public Repository getRepository() throws RepositoryException {
+                Repository r = repository;
+                if (r != null) {
+                    return repository;
+                } else {
+                    throw new RepositoryException("Repository not available");
+                }
+            }
+        };
     }
 
     /**

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml Fri Jan 11 03:06:13 2008
@@ -309,6 +309,14 @@
     </servlet>
 
     <!-- ====================================================================== -->
+    <!-- R M I   B I N D I N G   S E R V L E T                                  -->
+    <!-- ====================================================================== -->
+    <servlet>
+      <servlet-name>RMI</servlet-name>
+      <servlet-class>org.apache.jackrabbit.servlet.remote.RemoteBindingServlet</servlet-class>
+    </servlet>
+
+    <!-- ====================================================================== -->
     <!-- S E R V L E T   M A P P I N G                                          -->
     <!-- ====================================================================== -->
     <servlet-mapping>
@@ -322,6 +330,10 @@
     <servlet-mapping>
         <servlet-name>JCRWebdavServer</servlet-name>
         <url-pattern>/server/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>RMI</servlet-name>
+        <url-pattern>/rmi</url-pattern>
     </servlet-mapping>
 
     <!-- ====================================================================== -->

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/header.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/header.jsp?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/header.jsp (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/header.jsp Fri Jan 11 03:06:13 2008
@@ -49,6 +49,8 @@
               <li><a href="<%= request.getContextPath() %>/">Welcome</a></li>
               <li><a href="<%= request.getContextPath() %>/webdav-simple.jsp">Standard WebDAV</a></li>
               <li><a href="<%= request.getContextPath() %>/webdav-jcr.jsp">JCR WebDAV</a></li>
+              <li><a href="<%= request.getContextPath() %>/remote.jsp">Remote access</a></li>
+              <li><a href="<%= request.getContextPath() %>/local.jsp">Local access</a></li>
               <li><a href="<%= request.getContextPath() %>/troubleshooting.jsp">Troubleshooting</a></li>
             </ul>
           </li>

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/webdav-simple.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/webdav-simple.jsp?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/webdav-simple.jsp (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/webdav-simple.jsp Fri Jan 11 03:06:13 2008
@@ -44,6 +44,11 @@
   <li><a href="<%= href %>"><%= href %></a></li>
 </ul>
 <p>
+  The server asks for authentication, but by default any username and password
+  is accepted. You can modify this security policy in the repository
+  configuration file.
+</p>
+<p>
   To access other workspace than the default one, replace the last part of
   the URL (<code>/default/</code>) with the name of another workspace.
 </p>

Modified: jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/welcome.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/welcome.jsp?rev=611140&r1=611139&r2=611140&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/welcome.jsp (original)
+++ jackrabbit/branches/1.4/jackrabbit-webapp/src/main/webapp/welcome.jsp Fri Jan 11 03:06:13 2008
@@ -28,27 +28,29 @@
     %><jsp:forward page="bootstrap/missing.jsp"/><%
 }
 
-request.setAttribute("title", "Apache Jackrabbit WebDAV Server");
+request.setAttribute("title", "Apache Jackrabbit JCR Server");
 %><jsp:include page="header.jsp"/>
 <p>
-  Welcome to the Apache Jackrabbit WebDAV Server. This web application
-  contains a JCR content repository and makes it available to both remote
-  and local clients.
+  Welcome to the Apache Jackrabbit JCR Server. This web application
+  contains a JCR content repository and makes it available to clients
+  through WebDAV and other means.
 </p>
 <p>
-  This application proves the following two WebDAV "views" to the content
-  in the JCR content repository.
+  The following two WebDAV views are provided for accessing the
+  content in the JCR content repository.
 </p>
 <ul>
-<li><a href="webdav-simple.jsp">Standard WebDAV</a></li>
-<li><a href="webdav-jcr.jsp">JCR WebDAV</a></li>
+  <li><a href="webdav-simple.jsp">Standard WebDAV</a></li>
+  <li><a href="webdav-jcr.jsp">JCR WebDAV</a></li>
 </ul>
 <p>
-  Other web applications running in the same servlet container can access
-  the content repository through JNDI, and remote clients can use either
-  WebDAV or the standard JCR API through the <code>jackrabbit-jcr-rmi</code>
-  component for accessing content in the repository.
+  Clients can also access the repository using the JCR API. Both local
+  and remote access is supported.
 </p>
+<ul>
+  <li><a href="remote.jsp">Remote repository access</a></li>
+  <li><a href="local.jsp">Local repository access</a></li>
+</ul>
 
 <h3>About Apache Jackrabbit</h3>
 <p>