You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2007/01/12 10:38:43 UTC

svn commit: r495531 [2/2] - in /jackrabbit/trunk/jackrabbit-webapp/src/main: java/org/apache/jackrabbit/j2ee/ webapp/ webapp/WEB-INF/ webapp/WEB-INF/bootstrap/ webapp/WEB-INF/repository/ webapp/WEB-INF/templates/ webapp/bootstrap/

Copied: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/repository.xml (from r494040, jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/repository/repository.xml)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/repository.xml?view=diff&rev=495531&p1=jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/repository/repository.xml&r1=494040&p2=jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/repository.xml&r2=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/repository/repository.xml (original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/repository.xml Fri Jan 12 01:38:40 2007
@@ -16,97 +16,113 @@
    limitations under the License.
   -->
 <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.2//EN"
-                            "http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
+    "http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
 <Repository>
+  <!--
+  virtual file system where the repository stores global state
+  (e.g. registered namespaces, custom node types, etc.)
+  -->
+  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+    <param name="path" value="${rep.home}/repository"/>
+  </FileSystem>
+
+  <!--
+      security configuration
+  -->
+  <Security appName="Jackrabbit">
+    <!--
+        access manager:
+        class: FQN of class implementing the AccessManager interface
+    -->
+    <AccessManager
+        class="org.apache.jackrabbit.core.security.SimpleAccessManager">
+      <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+    </AccessManager>
+
+    <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
+      <!-- anonymous user name ('anonymous' is the default value) -->
+      <param name="anonymousId" value="anonymous"/>
+    </LoginModule>
+  </Security>
+
+  <!--
+  Example Cluster configuration.
+  -->
+  <!--
+  <Cluster id="node1">
+      <Journal class="org.apache.jackrabbit.core.cluster.FileJournal">
+          <param name="directory" value="${rep.home}/../shared/journals" />
+          <param name="revision" value="${rep.home}/revision.log" />
+      </Journal>
+  </Cluster>
+  -->
+  
+  <!--
+  location of workspaces root directory and name of default workspace
+  -->
+  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+
+  <!--
+  workspace configuration template:
+  used to create the initial workspace if there's no workspace yet
+  -->
+  <Workspace name="${wsp.name}">
     <!--
-    virtual file system where the repository stores global state
-    (e.g. registered namespaces, custom node types, etc.)
+    virtual file system of the workspace:
+    class: FQN of class implementing FileSystem interface
     -->
     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-	<param name="path" value="${rep.home}/repository"/>
+      <param name="path" value="${wsp.home}"/>
     </FileSystem>
-
     <!--
-        security configuration
+    persistence of the workspace:
+    class: FQN of class implementing PersistenceManager interface
     -->
-    <Security appName="Jackrabbit">
-        <!--
-            access manager:
-            class: FQN of class implementing the AccessManager interface
-        -->
-        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
-            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
-        </AccessManager>
-
-        <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
-           <!-- anonymous user name ('anonymous' is the default value) -->
-           <param name="anonymousId" value="anonymous"/>
-        </LoginModule>
-    </Security>
-
-    <!--
-    location of workspaces root directory and name of default workspace
-    -->
-    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
-    <!--
-    workspace configuration template:
-    used to create the initial workspace if there's no workspace yet
-    -->
-    <Workspace name="${wsp.name}">
-	<!--
-	virtual file system of the workspace:
-	class: FQN of class implementing FileSystem interface
-        -->
-        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-            <param name="path" value="${wsp.home}"/>
-	</FileSystem>
-	<!--
-	persistence of the workspace:
-	class: FQN of class implementing PersistenceManager interface
-        -->
-	<PersistenceManager class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
-	<!--
-	Search index and the file system it uses.
-        -->
-	<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-  		<param name="path" value="${wsp.home}/index"/>
-	</SearchIndex>
-    </Workspace>
-
-    <!--
-    Configures the versioning
-    -->
-    <Versioning rootPath="${rep.home}/version">
-	<!--
-	Configures the filesystem to use for versioning for the respective
-	persistence manager
-        -->
-        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-            <param name="path" value="${rep.home}/version"/>
-        </FileSystem>
-
-	<!--
-	Configures the persistence manager to be used for persisting version state.
-	Please note that the current versioning implementation is based on
-	a 'normal' persistence manager, but this could change in future
-	implementations.
-        -->
-	<PersistenceManager class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
-
-    </Versioning>
-
-
-    <!--
-        Search index for content that is shared repository wide
-        (/jcr:system tree, contains mainly versions)
-        
-        The same parameters are supported as in the search index configuration
-        inside the workspace definition element.
-        
-        This element is optional. If omitted, the /jcr:system tree will not be
-        indexed and no results will be returned for that tree!
+    <PersistenceManager
+        class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
+    <!--
+    Search index and the file system it uses.
     -->
     <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-        <param name="path" value="${rep.home}/repository/index"/>
+      <param name="path" value="${wsp.home}/index"/>
     </SearchIndex>
+  </Workspace>
+
+  <!--
+  Configures the versioning
+  -->
+  <Versioning rootPath="${rep.home}/version">
+    <!--
+    Configures the filesystem to use for versioning for the respective
+    persistence manager
+    -->
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+      <param name="path" value="${rep.home}/version"/>
+    </FileSystem>
+
+    <!--
+    Configures the persistence manager to be used for persisting version state.
+    Please note that the current versioning implementation is based on
+    a 'normal' persistence manager, but this could change in future
+    implementations.
+    -->
+    <PersistenceManager
+        class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
+
+  </Versioning>
+
+
+  <!--
+  Search index for content that is shared repository wide
+  (/jcr:system tree, contains mainly versions)
+
+  The same parameters are supported as in the search index configuration
+  inside the workspace definition element.
+
+  This element is optional. If omitted, the /jcr:system tree will not be
+  indexed and no results will be returned for that tree!
+  -->
+  <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+    <param name="path" value="${rep.home}/repository/index"/>
+  </SearchIndex>
 </Repository>

Modified: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml?view=diff&rev=495531&r1=495530&r2=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml Fri Jan 12 01:38:40 2007
@@ -50,6 +50,17 @@
         <servlet-class>org.apache.jackrabbit.j2ee.RepositoryStartupServlet</servlet-class>
 
         <init-param>
+            <param-name>bootstrap-config</param-name>
+            <param-value>jackrabbit/bootstrap.properties</param-value>
+            <description>
+                Property file that hold the same initialization properties than
+                the init-params below. If a parameter is specified in both
+                places the one in the bootstrap-config wins.
+            </description>
+        </init-param>
+
+        <!--
+        <init-param>
             <param-name>repository-config</param-name>
             <param-value>/WEB-INF/repository/repository.xml</param-value>
             <description>the repository config location</description>
@@ -66,6 +77,7 @@
             <param-value>jackrabbit.repository</param-value>
             <description>Repository Name under which the repository is registered via JNDI/RMI</description>
         </init-param>
+        -->
 
         <!--
             the following 3 parameters deal with registering the repository to
@@ -103,6 +115,7 @@
             JNDI environment variables for creating the initial context
             (all init parameters starting with java.naming.* will be added to the initial context environment).
         -->
+        <!--
         <init-param>
             <param-name>java.naming.provider.url</param-name>
             <param-value>http://www.apache.org/jackrabbit</param-value>
@@ -111,7 +124,7 @@
             <param-name>java.naming.factory.initial</param-name>
             <param-value>org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory</param-value>
         </init-param>
-
+        -->
         <load-on-startup>2</load-on-startup>
     </servlet>
 
@@ -128,15 +141,26 @@
         <servlet-class>org.apache.jackrabbit.j2ee.RepositoryAccessServlet</servlet-class>
 
         <init-param>
+            <param-name>bootstrap-config</param-name>
+            <param-value>jackrabbit/bootstrap.properties</param-value>
+            <description>
+                Property file that hold the same initialization properties than
+                the init-params below. If a parameter is specified in both
+                places the one in the bootstrap-config wins.
+            </description>
+        </init-param>
+        <!--
+        <init-param>
             <param-name>repository-name</param-name>
             <param-value>jackrabbit.repository</param-value>
             <description>Repository Name that is used to retrieve it via JNDI</description>
         </init-param>
-
+        -->
         <!--
             JNDI environment variables for creating the initial context
             (all init parameters starting with java.naming.* will be added to the initial context environment).
         -->
+        <!--
         <init-param>
             <param-name>java.naming.provider.url</param-name>
             <param-value>http://www.apache.org/jackrabbit</param-value>
@@ -145,7 +169,7 @@
             <param-name>java.naming.factory.initial</param-name>
             <param-value>org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory</param-value>
         </init-param>
-
+        -->
         <!--
             RMI url, if RMI remoting is needed
         -->
@@ -277,6 +301,10 @@
     <!-- S E R V L E T   M A P P I N G                                          -->
     <!-- ====================================================================== -->
     <servlet-mapping>
+        <servlet-name>RepositoryStartup</servlet-name>
+        <url-pattern>/admin/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
         <servlet-name>Webdav</servlet-name>
         <url-pattern>/repository/*</url-pattern>
     </servlet-mapping>
@@ -284,4 +312,11 @@
         <servlet-name>JCRWebdavServer</servlet-name>
         <url-pattern>/server/*</url-pattern>
     </servlet-mapping>
+
+    <!-- ====================================================================== -->
+    <!-- W E L C O M E   F I L E S                                              -->
+    <!-- ====================================================================== -->
+    <welcome-file-list>
+      <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
 </web-app>

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/error.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/error.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/error.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/error.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Error</title>
+</head>
+<body>
+<b>Some error occured during setup.</b>
+<p/>
+See the log files for details.
+<p/>
+<a href="../admin">back</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/error.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/exists.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/exists.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/exists.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/exists.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Already exists</title>
+</head>
+<body>
+<b>The repository home directory or configuration already exists.</b>
+<p/>
+You have choosen to create a <b>new</b> repository but the specified home
+directory or the configfile already exist.
+<p/>
+Please specify a correct location or choose to reuse an existing repository.
+<p/>
+<a href="../admin">back</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/exists.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/missing.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/missing.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/missing.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/missing.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Setup</title>
+</head>
+<body>
+<b>Your repository is not properly configured yet.</b>
+<p/>
+Please choose one of the following:<br>
+<hr size="1"/>
+<form action="../admin/" method="POST">
+    <input type="hidden" name="mode" value="new"/>
+    <table>
+        <tr><td colspan="2"><b>Create a new Repository</b></td></tr>
+        <tr><td>Repository Home:</td><td><input size="40" type="text" name="repository_home" value="jackrabbit" /></td></tr>
+        <tr><td>&nbsp;</td><td><br><input type="submit" value="create"></td></tr>
+    </table>
+</form>
+
+<br>
+<br>
+<hr size="1"/>
+<form action="../admin/" method="POST">
+    <input type="hidden" name="mode" value="existing"/>
+    <table>
+        <tr><td colspan="2"><b>Use an existing one</b></td></tr>
+        <tr><td>Repository Home:</td><td><input size="40" type="text" name="repository_home" value="jackrabbit" /></td></tr>
+        <tr><td>&nbsp;</td><td><br><input type="submit" value="submit"></td></tr>
+    </table>
+</form>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/missing.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/notexists.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/notexists.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/notexists.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/notexists.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Not exists</title>
+</head>
+<body>
+<b>The repository home directory or configuration do not exists.</b>
+<p/>
+You have choosen to <b>reuse</b> an existing repository but the specified home
+directory or the configfile do not exist.
+<p/>
+Please specify a correct location or choose to create a new repository.
+<p/>
+<a href="../admin">back</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/notexists.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/reconfigure.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/reconfigure.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/reconfigure.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/reconfigure.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Error</title>
+</head>
+<body>
+<b>Your repository is already properly configured an running.</b>
+<p/>
+Your changes were discarded. To reconfigure or reinstall the repository modify
+the respective configuration files or remove them.
+<p/>
+<a href="../">home</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/reconfigure.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/running.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/running.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/running.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/running.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Running</title>
+</head>
+<body>
+<b>Your repository is properly configured an running.</b>
+<p/>
+To reconfigure or reinstall the repository modify the respective configuration
+files or remove them.
+<p/>
+<a href="../">home</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/running.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/success.html
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/success.html?view=auto&rev=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/success.html (added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/success.html Fri Jan 12 01:38:40 2007
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>JCR Repository - Success</title>
+</head>
+<body>
+<b>Your repository is now properly configured an running.</b>
+<p/>
+To reconfigure or reinstall the repository modify the respective configuration
+files or remove them.
+<p/>
+<a href="../">home</a>
+</body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/bootstrap/success.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/index.jsp?view=diff&rev=495531&r1=495530&r2=495531
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/index.jsp (original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/index.jsp Fri Jan 12 01:38:40 2007
@@ -23,7 +23,17 @@
 <title>Jackrabbit JCR-Server</title>
 </head>
 <body style="font-family:monospace">
-<h1>JCR-Server</h1>
+<%
+    Repository rep;
+    try {
+        rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());
+    } catch (Throwable e) {
+        %>Error while accessing the repository: <font color="red"><%= e.getMessage() %></font><br><%
+        %>Check the configuration or use the <a href="admin/">easy setup</a> wizard.<%
+        return;
+    }
+
+%><h1>JCR-Server</h1>
 <h3>JCR-Server provides 2 views</h3><p/>
 <ol>
     <li>
@@ -69,9 +79,6 @@
     </li>
 </ol>
 <p/>
-<%
-    Repository rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());
-
-%><hr size="1"><em>Powered by <a href="<%= rep.getDescriptor(Repository.REP_VENDOR_URL_DESC) %>"><%= rep.getDescriptor(Repository.REP_NAME_DESC)%></a> version <%= rep.getDescriptor(Repository.REP_VERSION_DESC) %>.</em>
+<hr size="1"><em>Powered by <a href="<%= rep.getDescriptor(Repository.REP_VENDOR_URL_DESC) %>"><%= rep.getDescriptor(Repository.REP_NAME_DESC)%></a> version <%= rep.getDescriptor(Repository.REP_VERSION_DESC) %>.</em>
 </body>
 </html>