You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2005/01/31 14:17:29 UTC

svn commit: r149255 [1/2] - in incubator/jackrabbit/trunk/contrib/tck-webapp: ./ src/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/jackrabbit/ src/java/org/apache/jackrabbit/tck/ src/java/org/apache/jackrabbit/tck/j2ee/ src/webapp/ src/webapp/WEB-INF/ src/webapp/WEB-INF/classes/ src/webapp/WEB-INF/content-repository/ src/webapp/WEB-INF/lib/ src/webapp/WEB-INF/tck/ src/webapp/docroot/ src/webapp/docroot/imgs/ src/webapp/docroot/ui/

Author: mreutegg
Date: Mon Jan 31 05:17:24 2005
New Revision: 149255

URL: http://svn.apache.org/viewcvs?view=rev&rev=149255
Log:
Initial checkin of webbased JCR test application

Added:
    incubator/jackrabbit/trunk/contrib/tck-webapp/
    incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/lib/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/clear.png   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/error.png   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/failure.png   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/pass.png   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp   (with props)
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/status.jsp   (with props)

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml Mon Jan 31 05:17:24 2005
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+   Copyright 2004-2005 The Apache Software Foundation or its licensors,
+                       as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+<project 
+	default="tck-war" 
+	xmlns:m="jelly:maven"
+	xmlns:ant="jelly:ant"
+	xmlns:j="jelly:core"
+>
+
+	<goal name="tck-war">
+		<attainGoal name="tck-build" />
+		<attainGoal name="war:war" />
+	</goal>
+
+	<goal name="tck-build">
+		<attainGoal name="jar:install" />
+	</goal>
+
+	<postGoal name="build:start">
+	  <attainGoal name="jackrabbit-install" />
+	</postGoal>
+	
+	<goal name="jackrabbit-install">
+	  <!-- build the dependend sub project -->
+      	  <m:reactor 
+            basedir="../.."
+            includes="project.xml"
+            goals="jar:install"
+            banner="Building"
+            ignoreFailures="false"/>
+	</goal>
+
+	<!-- post goal for cleaning the subprojects -->
+	<postGoal name="clean">
+    	<m:reactor 
+    		basedir="${basedir}"
+            includes="../../project.xml"
+            goals="clean"
+            banner="Cleaning"
+            ignoreFailures="true"/>
+	</postGoal>
+
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties Mon Jan 31 05:17:24 2005
@@ -0,0 +1,5 @@
+# ------------------------------------------------------------------------
+maven.repo.remote = http://www.ibiblio.org/maven/,http://www.day.com/maven/
+maven.test.skip = true
+
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml Mon Jan 31 05:17:24 2005
@@ -0,0 +1,166 @@
+<?xml version="1.0"?>
+<!--
+   Copyright 2004-2005 The Apache Software Foundation or its licensors,
+                       as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+<project>
+    <!-- ====================================================================== -->
+    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
+    <!-- ====================================================================== -->
+    <id>tck-webapp</id>
+    <!-- <type>war</type> -->
+    <name>Day TCK web application</name>
+    <currentVersion>0.1</currentVersion>
+
+
+    <!-- ====================================================================== -->
+    <!-- D E P E N D E N C I E S                                                -->
+    <!-- ====================================================================== -->
+    <dependencies>
+
+        <!-- dependencies from jackrabbit that we want to bundle -->
+	  <dependency>
+            <id>tck-webapp</id>
+            <version>0.1</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <id>concurrent</id>
+            <version>1.3.4</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>commons-collections</id>
+            <version>2.1</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>lucene</groupId>
+            <artifactId>lucene</artifactId>
+            <version>1.3</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.6.2</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+
+    <!-- jcr -->    
+        <dependency>
+            <id>jcr</id>
+            <version>0.15</version>
+            <!-- <properties>
+                <war.bundle>true</war.bundle>
+            </properties>-->
+        </dependency>
+        <!-- dependencies from jcr that we want to bundle -->
+        <dependency>
+            <id>jackrabbit</id>
+            <version>0.15-dev</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+
+    	<dependency>
+      	<groupId>cqfs</groupId>
+      	<artifactId>cqfs-jackrabbit</artifactId>
+      	<version>3.5.6</version>
+      	<url>http://www.day.com/maven/cqfs/jars/cqfs-jackrabbit-3.5.6.jar</url>
+		<properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+    	</dependency>
+
+        <dependency>
+            <id>cqfs</id>
+            <version>3.5.6</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>commons-logging</id>
+            <version>1.0</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+    <!-- -->
+
+    <!-- own dependencies -->    
+        <dependency>
+            <id>jdom</id>
+            <version>1.0</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>log4j</id>
+            <version>1.2.8</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+    <!-- -->
+    
+    <!-- own dependencies (build only) -->
+        <dependency>
+            <id>servletapi</id>
+            <version>2.3</version>
+        </dependency>
+        <dependency>
+            <id>junit</id>
+            <version>3.8.1</version>
+            <properties>
+                <war.bundle>true</war.bundle>
+            </properties>
+        </dependency>
+    
+     </dependencies>
+
+    <!-- ====================================================================== -->
+    <!-- B U I L D  D E S C R I P T I O N                                       -->
+    <!-- ====================================================================== -->
+    <build>
+        <sourceDirectory>${basedir}/src/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/java</directory>
+                <includes>
+                    <include>**/*.java</include>
+                    <include>**/*.xml</include>
+                    <include>**/*.xsd</include>
+                    <include>**/*.properties</include>
+                    <include>**/*.dtd</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+</project>

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Mon Jan 31 05:17:24 2005
@@ -0,0 +1 @@
+test https://svn.apache.org/repos/asf/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+/**
+ * Just a helper class
+ */
+public class TckHelper {
+    public static String getStatus(int state) {
+    String status = "UNDEFINED";
+
+    switch (state) {
+        case TestResult.SUCCESS:
+            status = "SUCCESS";
+            break;
+        case TestResult.ERROR:
+            status = "ERROR";
+            break;
+        case TestResult.FAILURE:
+            status = "FAILURE";
+    }
+    return status;
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+import junit.framework.Test;
+import junit.runner.BaseTestRunner;
+import javax.servlet.jsp.JspWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+import java.util.HashMap;
+import java.text.MessageFormat;
+
+/**
+ * The <code>TckTestRunner</code> class implements the <code>TestListener</code> interface.
+ */
+public class TckTestRunner extends BaseTestRunner {
+    /** Test state */
+    int state;
+
+    /** The test */
+    Test test;
+
+    /** the writer */
+    Writer writer;
+
+    /*** contains all results from all tests */
+    Map results;
+
+    /** test start time */
+    long startTime;
+
+    /** time that a test took */
+    long testTime;
+
+    /** Result of a test */
+    TestResult result;
+
+    /** String containing defined log output */
+    private String logString;
+
+    /** String containing defined interaction output */
+    private String interactionString;
+
+    /**
+     * The constructor inits the result map and sets the writer
+     *
+     * @param writer
+     */
+    public TckTestRunner(JspWriter writer) {
+        this.writer = writer;
+        results = new HashMap();
+    }
+
+    /**
+     * This method is called everytime a test is executed.
+     * The result object is "reset". the state is "reset" to its default value.
+     * The startTime is set.
+     *
+     * @param test The <code>Test</code> which will be executed
+     */
+    public synchronized void startTest(Test test) {
+        result = new TestResult();
+        state = TestResult.SUCCESS;
+        startTime = System.currentTimeMillis();
+    }
+
+    /**
+     * The test could not be started. This should not happen...
+     *
+     * @param message error message
+     */
+    protected void runFailed(String message) {
+        String msg = "RUN FAILED:" + message;
+        write(msg);
+    }
+
+    /**
+     * This method is called everytime a test is finished. it does not matter if the
+     * test was successful or not. The <code>TestResult</code> is added to the results list.
+     *
+     * @param test the current <code>Test</code>
+     */
+    public synchronized void endTest(Test test) {
+        testTime = System.currentTimeMillis() - startTime;
+        result.setTest(test);
+        result.setTestTime(testTime);
+        result.setStatus(state);
+        results.put(test.toString(), result);
+        write(test.toString());
+    }
+
+    /**
+     * This method is called when a <code>Test</code> failed.
+     * The "error" code is passed:
+     * <li>- an error occured while testing
+     * <li>- the test failed
+     * And the <code>Throwable</code> object with the information why the test failed is passed as well.
+     *
+     * @param status "error" code
+     * @param test current <code>Test</code>
+     * @param t <code>Throwable</code> of error/failure
+     */
+    public void testFailed(int status, Test test, Throwable t) {
+        state = status;
+        result.setErrorMsg(t.toString());
+    }
+
+    /**
+     * Writes test logging information to output
+     *
+     * @param msg
+     */
+    private void write(String msg) {
+        if (writer != null) {
+            try {
+                String html = "";
+                if (logString!= null && !"".equals(logString)) {
+                    html = MessageFormat.format(logString, new String[]{msg, TckHelper.getStatus(state)});
+                    writer.write(html);
+                }
+
+                String color = "clear";
+                switch (state) {
+                    case TestResult.SUCCESS:
+                        color = "pass";
+                        break;
+                    case TestResult.ERROR:
+                        color = "error";
+                        break;
+                    case TestResult.FAILURE:
+                        color = "failure";
+                }
+
+                if (interactionString!= null && !"".equals(interactionString)) {
+                    html = MessageFormat.format(interactionString, new String[]{msg, color, String.valueOf(testTime)});
+                    writer.write(html);
+                }
+                writer.flush();
+            } catch (IOException e) {
+                // ignore
+            }
+        } else {
+            System.out.println(msg);
+        }
+    }
+
+    /**
+     * Returns all results
+     * @return all test results
+     */
+    public Map getResults() {
+        return results;
+    }
+
+    public void setLogString(String logString) {
+        this.logString = logString;
+    }
+
+    public void setInteractionString(String interactionString) {
+        this.interactionString = interactionString;
+    }
+
+    public void testStarted(String testName) {}
+
+	public void testEnded(String testName) {}
+
+	}
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+import junit.framework.TestSuite;
+import junit.framework.Test;
+import java.io.*;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.*;
+
+/**
+ * The <code>TestFinder</code> class is responsible to find all <code>TestCase</code>s which are
+ * in a jar. The information which jar has to be searched is passed in the constructor.
+ */
+public class TestFinder {
+    /** Jar file to search the test classes */
+    private JarFile jarFile;
+
+    /** all tests */
+    private Map allTests;
+
+    /** all test suites */
+    private Map suites;
+
+    /**
+     * The path where the jar containing the test classes and its sources is residing is passed here.
+     *
+     * @throws IOException
+     */
+    public TestFinder() throws IOException {
+        allTests = new HashMap();
+        suites = new HashMap();
+    }
+
+    /**
+     * This method searches all tests.
+     *
+     * @param exclude file(class) name (e.g. allTests) of tests which should be excluded.
+     * @param in <code>InputStream</code> of jar file containing the test class sources
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    public void find(InputStream in, String exclude) throws IOException, ClassNotFoundException {
+        File tmpFile = null;
+        try {
+            // save to a temp file
+            tmpFile = File.createTempFile("tck-tests", "jar");
+            OutputStream out = null;
+            try {
+                out = new FileOutputStream(tmpFile);
+                byte[] buf = new byte[1024];
+                int len;
+                while ((len = in.read(buf)) > 0) {
+                    out.write(buf, 0, len);
+                }
+            } finally {
+                in.close();
+                out.close();
+            }
+
+            jarFile = new JarFile(tmpFile);
+
+            // go through all jar file entries and take the one we are interessted in.
+            Enumeration enum = jarFile.entries();
+
+            while (enum.hasMoreElements()) {
+                JarEntry entry = (JarEntry) enum.nextElement();
+                String name = entry.getName();
+
+                if (!entry.isDirectory() && name.endsWith(".java")) {
+                    // only source files are from interesst
+                    String classname = name.replace('/','.').substring(0, name.lastIndexOf(".java"));
+
+                    Class testclass = Class.forName(classname);
+
+                    // check if class is really a testsuite
+                    if (!isTestSuite(testclass)) {
+                        continue;
+                    }
+
+                    // check for files to be excluded
+                    if (name.endsWith(exclude)) {
+                        continue;
+                    }
+
+                    // retrieve keyword from source file
+                    String keyword = getKeyword(entry);
+
+                    // classify testsuite (level1, level2,...)
+                    if (suites.containsKey(keyword)) {
+                        TestSuite suite = (TestSuite) suites.get(keyword);
+                        suite.addTestSuite(testclass);
+                    } else {
+                        TestSuite suite = new TestSuite(keyword);
+                        suite.addTestSuite(testclass);
+                        suites.put(keyword, suite);
+                    }
+
+                    // memorize tests
+                    allTests.put(classname, keyword);
+                }
+            }
+        } finally {
+            if (tmpFile != null) {
+                tmpFile.delete();
+            }
+        }
+    }
+
+    /**
+     * Check if the passed test class is a "real" test suite
+     *
+     * @param testclass class to check
+     * @return true if a test suite
+     */
+    private boolean isTestSuite(Class testclass) {
+        TestSuite ts = new TestSuite(testclass);
+        if (ts.countTestCases() > 0) {
+            Test t = (Test) ts.tests().nextElement();
+            if (t.toString().startsWith("warning")) {
+                return false;
+            }
+        } else {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Reads the keyword from the java source.
+     *
+     * @param entry <code>JarEntry</code> to parse
+     * @return returns the existing keyword or "unspecified"
+     * @throws IOException
+     */
+    private String getKeyword(JarEntry entry) throws IOException {
+        InputStream input = jarFile.getInputStream(entry);
+        InputStreamReader isr = new InputStreamReader(input);
+        BufferedReader reader = new BufferedReader(isr);
+        String line;
+        while ((line = reader.readLine()) != null) {
+            String keyword = null;
+            if ((keyword = parseLine(line)) != null) {
+                return keyword;
+            }
+        }
+        reader.close();
+        return "unspecified";
+    }
+
+    /**
+     * Parses a line and checks for the "keywords" keyword
+     *
+     * @param line line to parse
+     * @return the kewyword string or null
+     */
+    private String parseLine(String line) {
+        int pos = line.indexOf("keywords");
+        int len = "keywords".length();
+        String word = "";
+
+        if ( pos >= 0) {
+            char l[] = line.toCharArray();
+            pos += len;
+
+            while (pos < l.length) {
+                char c = l[pos];
+
+                switch (c) {
+                    case 9: // '\t'
+                    case 10: // '\n'
+                    case 12: // '\f'
+                    case 13: // '\r'
+                    case 32: // ' '
+                        if (!"".equals(word)) {
+                            return word;
+                        }
+                        break;
+                    default:
+                        word += c;
+                }
+                pos++;
+            }
+        }
+        return ("".equals(word)) ? null : word;
+    }
+
+    /**
+     * Returns all tests categorized by it's keyword
+     * @return all tests
+     */
+    public Map getTests() {
+        return allTests;
+    }
+
+    /**
+     * Returns all built test suites. the suites are categorized:
+     * <li> - level1
+     * <li> - level 2
+     * <li> - optional...
+     *
+     * @return test suites
+     */
+    public Map getSuites() {
+        return suites;
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestFinder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+import junit.framework.Test;
+
+/**
+ * The <code>TestResult</code> class is just a helper class to store test results.
+ */
+public class TestResult {
+
+    /** Test succeeded */
+    public static final int SUCCESS = 0;
+
+    /** An error occured while testing */
+    public static final int ERROR = 1;
+
+    /** The test failed */
+    public static final int FAILURE = 2;
+
+    /** The test */
+    private Test test;
+
+    /** Test status */
+    private int status;
+
+    /** Error message */
+    private String errorMsg;
+
+    /** Time that consumed while testing */
+    private long testTime;
+
+    public TestResult() {
+        // do nothing
+    }
+
+    public long getTestTime() {
+        return testTime;
+    }
+
+    public void setTestTime(long testTime) {
+        this.testTime = testTime;
+    }
+
+    public Test getTest() {
+        return test;
+    }
+
+    public void setTest(Test test) {
+        this.test = test;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getErrorMsg() {
+        return errorMsg;
+    }
+
+    public void setErrorMsg(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TestResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+import junit.framework.TestSuite;
+import junit.framework.TestResult;
+import javax.jcr.*;
+import javax.jcr.nodetype.ConstraintViolationException;
+import java.util.*;
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.RepositoryHelper;
+
+/**
+ * The <code>Tester</code> starts the all tests and saves all tests.
+ */
+public class Tester {
+
+    /** Object containing all tests */
+    TestFinder tests;
+
+    /** all test results are stored here */
+    Map results;
+
+    /** the test listener */
+    TckTestRunner runner;
+
+    /**
+     * The constructor...
+     *
+     * @param tests All tests found using <code>TestFinder</code>
+     */
+    public Tester(TestFinder tests, TckTestRunner runner) {
+        this.tests = tests;
+        results = new HashMap();
+        this.runner = runner;
+
+        // set the configuration for the to be tested repository
+        AbstractJCRTest.helper = new RepositoryHelper(WebAppTestConfig.getConfig());
+    }
+
+    /**
+     * Calling this method starts the testing. All test results will be stored in the
+     * results hashmap for further use.
+     *
+     * @return the result list (map)
+     */
+    public Map run() {
+
+        // get suites (level1, level2, ...)
+        Iterator suites = tests.getSuites().keySet().iterator();
+
+        while (suites.hasNext()) {
+            TestSuite suite = (TestSuite) tests.getSuites().get(suites.next());
+
+            TestResult result = new TestResult();
+            result.addListener(runner);
+            try {
+                suite.run(result);
+                results.putAll(runner.getResults());
+            } catch (Exception e) {
+                // ignore
+            }
+        }
+        return results;
+    }
+
+    /**
+     * This method stores the result underneath the passed node in this structure:
+     * <pre>
+     * node
+     *  + suite name 1
+     *    + test 1
+     *    + test 2
+     *    ...
+     *  + suite name 2
+     *    + test a
+     *    + test b
+     *    ...
+     *  ....
+     * </pre>
+     * @param node parent <code>Node</code> for storage
+     * @throws RepositoryException
+     * @throws ConstraintViolationException
+     * @throws InvalidItemStateException
+     * @throws AccessDeniedException
+     */
+    public void storeResults(Node node) throws RepositoryException, ConstraintViolationException, InvalidItemStateException, AccessDeniedException {
+        // create categories: level1, level2....
+        Iterator keyItr = tests.getSuites().keySet().iterator();
+        while (keyItr.hasNext()) {
+            node.addNode((String) keyItr.next());
+        }
+
+        // save test results here
+        Iterator itr = results.keySet().iterator();
+        while (itr.hasNext()) {
+            String key = (String) itr.next();
+            org.apache.jackrabbit.tck.TestResult tr = (org.apache.jackrabbit.tck.TestResult) results.get(key);
+            String className = tr.getTest().getClass().getName();
+            String testName = key.substring(0, key.indexOf("("));
+            String keyword = (String) tests.getTests().get(className);
+            if (keyword != null) {
+                Node testResNode = node.addNode(keyword + "/" + key);
+                testResNode.setProperty("name", testName);
+                testResNode.setProperty("status", tr.getStatus());
+                if (tr.getErrorMsg() != null) {
+                   testResNode.setProperty("errrormsg", tr.getErrorMsg());
+                }
+                testResNode.setProperty("testtime", tr.getTestTime());
+            }
+        }
+        node.save();
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck;
+
+import org.apache.jackrabbit.tck.j2ee.RepositoryServlet;
+import org.apache.jackrabbit.test.JNDIRepositoryStub;
+
+import javax.jcr.Session;
+import javax.jcr.RepositoryException;
+import javax.jcr.Node;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Properties;
+import java.io.InputStream;
+import java.io.IOException;
+
+
+/**
+ * The <code>WebAppTestConfig</code> class reads and saves the config in the tck web app specific way.
+ */
+public class WebAppTestConfig {
+    public final static String[] propNames = {JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME,
+                                              JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP, "java.naming.provider.url", "java.naming.factory.initial",
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_PWD,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_NAME,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_PWD,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_TESTROOT,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE};
+
+    /**
+     * Reads the config entries from the repository
+     *
+     * @return test config
+     */
+    public static Map getConfig() {
+        Map config = new HashMap();
+        try {
+            Session repSession = RepositoryServlet.getSession(null);
+            Node configNode = repSession.getRootNode().getNode("testconfig");
+
+            for (int i = 0; i < propNames.length; i++) {
+                String pName = propNames[i];
+                config.put(pName, configNode.getProperty(pName).getString());
+            }
+        } catch (RepositoryException e) {
+            return new HashMap();
+        }
+        return config;
+    }
+
+    /**
+     * Reads the original config from the property file.
+     *
+     * @return original read only config
+     */
+    public static Map getOriConfig() {
+        Properties props = new Properties();
+        InputStream is = WebAppTestConfig.class.getClassLoader().getResourceAsStream(JNDIRepositoryStub.STUB_IMPL_PROPS);
+        if (is != null) {
+            try {
+                props.load(is);
+            } catch (IOException e) {
+                // ignore
+            }
+        }
+        return props;
+    }
+
+    /**
+     * Saves the configuration entries which needs to be set.
+     *
+     * @param request request with config changes
+     * @param repSession <code>Session</code> used to write config
+     * @throws RepositoryException
+     */
+    public static void save(HttpServletRequest request, Session repSession) throws RepositoryException {
+        // create config node if not yet existing
+        Node testConfig;
+        if (repSession.getRootNode().hasNode("testconfig")) {
+            testConfig = repSession.getRootNode().getNode("testconfig");
+        } else {
+            testConfig = repSession.getRootNode().addNode("testconfig", "nt:unstructured");
+            repSession.getRootNode().save();
+        }
+
+        // save config entries
+        for (int i = 0; i < propNames.length; i++) {
+            String pName = propNames[i];
+            setEntry(pName, request, testConfig);
+        }
+
+        // save
+        testConfig.save();
+    }
+
+    /**
+     * Set config entry
+     *
+     * @param propname config property name
+     * @param request request to read property value
+     * @param testConfig  test config <code>Node</code>
+     * @throws RepositoryException
+     */
+    private static void setEntry(String propname, HttpServletRequest request, Node testConfig) throws RepositoryException {
+        if (request.getParameter(propname) != null) {
+            testConfig.setProperty(propname, request.getParameter(propname));
+        }
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java Mon Jan 31 05:17:24 2005
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.tck.j2ee;
+
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.log4j.Logger;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+import org.apache.jackrabbit.core.RepositoryImpl;
+import org.xml.sax.InputSource;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import javax.jcr.*;
+import java.io.*;
+import java.util.Properties;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * The RepositoryServlet connects (starts) to a jsr170 repository and
+ * puts the reference into the application context
+ */
+public class RepositoryServlet extends HttpServlet {
+
+    private static Logger log;// = Logger.getLogger(RepositoryServlet.class);
+
+    public final static String INIT_PARAM_REPOSITORY_CONFIG = "repository-config";
+
+    public final static String INIT_PARAM_REPOSITORY_HOME = "repository-home";
+
+    public final static String INIT_PARAM_REPOSITORY_NAME = "repository-name";
+
+    // todo: implement correctly
+    public final static String PARAM_LOG4J_CONFIG = "log4j-config";
+
+    public static RepositoryImpl repository;
+
+    public void init() throws ServletException {
+        super.init();
+
+        try {
+            // setup log4j
+            // todo: do correctly
+            String log4jConfig = getServletConfig().getInitParameter(PARAM_LOG4J_CONFIG);
+            InputStream in = getServletContext().getResourceAsStream(log4jConfig);
+            if (in == null) {
+                // try normal init
+                PropertyConfigurator.configure(log4jConfig);
+            } else {
+                try {
+                    Properties log4jProperties = new Properties();
+                    log4jProperties.load(in);
+                    in.close();
+                    PropertyConfigurator.configure(log4jProperties);
+                } catch (IOException e) {
+                    throw new ServletException("Unable to load log4jProperties: " + e.toString());
+                }
+            }
+            log_info("RepositoryServlet initializing..");
+
+            // setup home directory
+            String repHome = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_HOME);
+            if (repHome == null) {
+                log_info(INIT_PARAM_REPOSITORY_HOME + " missing.");
+                throw new ServletException(INIT_PARAM_REPOSITORY_HOME + " missing.");
+            }
+                File repositoryHome;
+            try {
+                repositoryHome = new File(repHome).getCanonicalFile();
+            } catch (IOException e) {
+                log_info(INIT_PARAM_REPOSITORY_HOME + " invalid." + e.toString());
+                throw new ServletException(INIT_PARAM_REPOSITORY_HOME + " invalid." + e.toString());
+            }
+            log_info("  repository-home = " + repositoryHome.getPath());
+
+            // setup repository
+            String repConfig = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_CONFIG);
+            if (repConfig == null) {
+                log_info(INIT_PARAM_REPOSITORY_CONFIG + " missing.");
+                throw new ServletException(INIT_PARAM_REPOSITORY_CONFIG + " missing.");
+            }
+            log_info("  repository-config = " + repConfig);
+
+            in = getServletContext().getResourceAsStream(repConfig);
+            if (in == null) {
+                try {
+                    in = new FileInputStream(new File(repositoryHome, repConfig));
+                } catch (FileNotFoundException e) {
+                    log_info(INIT_PARAM_REPOSITORY_CONFIG + " invalid." + e.toString());
+                    throw new ServletException(INIT_PARAM_REPOSITORY_CONFIG + " invalid." + e.toString());
+                }
+            }
+
+            // get repository name
+            String repositoryName = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_NAME);
+            if (repositoryName == null) {
+                repositoryName = "default";
+            }
+            log_info("  repository-name = " + repositoryName);
+
+            InputSource is = new InputSource(in);
+            RepositoryConfig config = RepositoryConfig.create(is, repositoryHome.getPath());
+            repository = RepositoryImpl.create(config);
+
+            log_info("JSR170 RI Repository initialized.");
+
+        } catch (RepositoryException e) {
+            log_info("Unable to initialize repository: " + e.toString(), e);
+            throw new ServletException("Unable to initialize repository: " + e.toString(), e);
+        }
+
+    }
+
+    public void destroy() {
+        super.destroy();
+        log_info("RepositoryServlet shutting down...");
+    }
+
+    private void log_info(String msg) {
+        if (log != null) {
+            log.info(msg);
+        } else {
+            log(msg);
+        }
+    }
+
+    private void log_info(String msg, Throwable t) {
+        if (log != null) {
+            log.info(msg, t);
+        } else {
+            log(msg, t);
+        }
+    }
+    /**
+     * Returns the JSR170 repository
+     * @return a jsr170 repository
+     */
+    public static Repository getRepository() {
+        return repository;
+    }
+
+    /**
+     * Returns the jcr session
+     *
+     * @param req
+     * @return
+     */
+    public static Session getSession(HttpServletRequest req) {
+        try {
+            return login();
+        } catch (RepositoryException e) {
+            log.error("Unable to retrieve session: " + e.toString());
+        }
+        return null;
+    }
+
+    /**
+     * logs in to the repository. currently only as anonymous user
+     * @throws RepositoryException
+     */
+    public static Session login()
+	    throws RepositoryException {
+
+        // login
+        Session repSession = repository.login(null, null);
+        return repSession;
+    }
+
+}

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties Mon Jan 31 05:17:24 2005
@@ -0,0 +1,31 @@
+#
+# This is the configuration file for the JNDI repository test stub.
+#
+
+# Stub implementation class
+javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.test.JNDIRepositoryStub
+
+# JNDI configuration
+javax.jcr.tck.jndi.repository_lookup_name=tck.repository
+java.naming.provider.url=http://www.day.com/tck
+java.naming.factory.initial=com.day.crx.jndi.provider.MemoryInitialContextFactory
+
+# credential configuration
+javax.jcr.tck.superuser.name=superuser
+javax.jcr.tck.superuser.pwd=
+javax.jcr.tck.readwrite.name=superuser
+javax.jcr.tck.readwrite.pwd=
+javax.jcr.tck.readonly.name=anonymous
+javax.jcr.tck.readonly.pwd=
+
+# global test configuration
+javax.jcr.tck.testroot=/testroot
+javax.jcr.tck.nodetype=nt:unstructured
+javax.jcr.tck.nodename1=foo
+javax.jcr.tck.nodename2=bar
+javax.jcr.tck.nodename3=foobar
+
+# sample for per test case config overriding
+# Test class: AddNodeText
+# Test method: testName
+javax.jcr.tck.AddNodeTest.testName.nodename1=myname

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties Mon Jan 31 05:17:24 2005
@@ -0,0 +1,20 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=INFO, stdout
+#log4j.rootLogger=DEBUG, stdout, file
+#log4j.rootLogger=ERROR, stdout, file
+
+# 'stdout' is set to be a ConsoleAppender.
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+
+# 'stdout' uses PatternLayout
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+
+# 'file' is set to be a FileAppender.
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=jcr.log
+
+# 'file' uses PatternLayout.
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml Mon Jan 31 05:17:24 2005
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "file://config.dtd"> -->
+<!DOCTYPE Repository [
+    <!--
+    the Repository element configures a repository instance;
+    individual workspaces of the repository are configured through
+    separate configuration files called workspace.xml which are
+    located in a subfolder of the workspaces root directory
+    (see Workspaces element).
+
+    it consists of
+
+    a FileSystem element (the virtual file system
+    used by the repository to persist global state such as
+    registered namespaces, custom node types, etc..
+
+    a Workspaces element that specifies to the location of
+    workspaces root directory and the name of default workspace
+
+    a Workspace element that is used as a workspace configuration
+    template; it is used to create the initial workspace if there's
+    no workspace yet and for creating additional workspaces through
+    the api
+    -->
+    <!ELEMENT Repository (FileSystem,Workspaces,Workspace,Versioning)>
+
+    <!--
+    a virtual file system
+    -->
+    <!ELEMENT FileSystem (param*)>
+    <!ATTLIST FileSystem
+      class CDATA #REQUIRED>
+
+    <!--
+    generic parameter (name/value pair)
+    -->
+    <!ELEMENT param EMPTY>
+    <!ATTLIST param
+      name CDATA #REQUIRED
+      value CDATA #REQUIRED>
+
+    <!--
+    the Workspaces element specifies the workspaces root directory
+    (rootPath attribute) and the name of the default workspace
+    (defaultWorkspace attribute).
+
+    individual workspaces are configured through individual workspace.xml
+    files located in a subfolder each of the workspaces root directory.
+    -->
+    <!ELEMENT Workspaces EMPTY>
+    <!ATTLIST Workspaces
+      rootPath CDATA #REQUIRED
+      defaultWorkspace CDATA #REQUIRED>
+
+    <!--
+    the Workspace element serves as a workspace configuration template;
+    it is used to create the initial workspace if there's no workspace yet
+    and for creating additional workspaces through the api
+    -->
+    <!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex)>
+    <!ATTLIST Workspace
+      name CDATA #REQUIRED>
+
+    <!--
+    the PersistenceManager element configures the persistence manager
+    to be used for the workspace; the class attribute specifies the
+    FQN of the class implementing PersistenceManager interface
+    -->
+    <!ELEMENT PersistenceManager (param*)>
+    <!ATTLIST PersistenceManager
+      class CDATA #REQUIRED>
+
+    <!--
+    the SearchIndex element specifies the locaction of the search index
+    (used by the QueryManager)
+    -->
+    <!ELEMENT SearchIndex (FileSystem)>
+
+    <!--
+    the Versioning element specifies the location and persistence manager
+    that is used to store versions
+    -->
+    <!ELEMENT Versioning (FileSystem, PersistenceManager)>
+    <!ATTLIST Versioning
+      rootPath CDATA #REQUIRED
+    >
+
+]>
+<!-- Example Repository Configuration File -->
+<Repository>
+    <!--
+    virtual file system where the repository stores global state
+    (e.g. registered namespaces, custom node types, etc.)
+    -->
+    <!--
+    <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
+        <param name="path" value="${rep.home}/repStore.dat"/>
+        <param name="autoRepair" value="false"/>
+    </FileSystem>
+    -->
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+        <param name="path" value="${rep.home}/repository"/>
+    </FileSystem>
+
+    <!--
+    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>
+        -->
+        <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
+            <param name="path" value="${wsp.home}/repStore.dat"/>
+            <param name="autoRepair" value="false"/>
+            <param name="autoSync" value="false"/>
+        </FileSystem>
+        <!--
+        persistence manager 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>
+            <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+                <param name="path" value="${wsp.home}/index"/>
+            </FileSystem>
+        </SearchIndex>
+        -->
+
+    </Workspace>
+
+    <!--
+        Configures the versioning
+    -->
+    <Versioning rootPath="${rep.home}/version">
+        <!--
+            Configures the filesystem to use for versioning ofr the respective
+            persistence manager
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${rep.home}/version"/>
+        </FileSystem>
+
+        <!--
+            Configures the perisistence manager to use for the versioning.
+            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.xml.XMLPersistenceManager" />
+    </Versioning>
+
+</Repository>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties Mon Jan 31 05:17:24 2005
@@ -0,0 +1,27 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=INFO, stdout
+#log4j.rootLogger=DEBUG, stdout, file
+#log4j.rootLogger=ERROR, stdout, file
+log4j.logger.org.apache.jackrabbit.test.testwebapp.j2ee.TesterServlet.login=INFO, login
+
+# 'stdout' is set to be a ConsoleAppender.
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+
+# 'stdout' uses PatternLayout
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+
+# 'file' is set to be a FileAppender.
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=jcr.log
+
+# 'file' uses PatternLayout.
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+
+# 'login' is set to be a FileAppender.
+log4j.appender.login=org.apache.log4j.FileAppender
+log4j.appender.login.File=tck/home/login.log
+log4j.appender.login.layout=org.apache.log4j.PatternLayout
+log4j.appender.login.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/tck/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml Mon Jan 31 05:17:24 2005
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+<web-app>
+    <display-name>TCK web application</display-name>
+
+    <!-- ====================================================================== -->
+    <!-- R E P O S I T O R Y   S E R V L E T                                    -->
+    <!-- ====================================================================== -->
+    <servlet>
+        <servlet-name>Repository</servlet-name>
+            <description>repository servlet that starts the repository and registers it to JNDI.</description>
+        <servlet-class>org.apache.jackrabbit.tck.j2ee.RepositoryServlet</servlet-class>
+
+        <init-param>
+            <param-name>log4j-config</param-name>
+            <param-value>/WEB-INF/content-repository/log4j.properties</param-value>
+                <description>initial log4j configuration</description>
+        </init-param>
+
+        <init-param>
+            <param-name>repository-config</param-name>
+            <param-value>/WEB-INF/content-repository/repository.xml</param-value>
+                <description>the repository config location</description>
+        </init-param>
+
+        <init-param>
+            <param-name>repository-home</param-name>
+            <param-value>tck/content-repository</param-value>
+                <description>the repository home</description>
+        </init-param>
+
+        <init-param>
+            <param-name>repository-name</param-name>
+            <param-value>tck.repository</param-value>
+                <description>Repository Name under which the repository is registered via JNDI</description>
+        </init-param>
+
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+</web-app>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp Mon Jan 31 05:17:24 2005
@@ -0,0 +1,123 @@
+<%--
+Copyright 2004-2005 The Apache Software Foundation or its licensors,
+                    as applicable.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+--%><%@ page import="javax.jcr.Session,
+                 javax.jcr.Node,
+                 javax.jcr.NodeIterator,
+                 java.text.SimpleDateFormat,
+                 java.util.*,
+                 org.apache.jackrabbit.tck.WebAppTestConfig,
+                 org.apache.jackrabbit.test.JNDIRepositoryStub,
+                 org.apache.jackrabbit.tck.WebAppTestConfig,
+                 org.apache.jackrabbit.tck.j2ee.RepositoryServlet"
+%><%@page session="false" %><%
+
+Session repSession = RepositoryServlet.getSession(request);
+if (repSession == null) {
+    return;
+}
+
+String mode = request.getParameter("mode");
+
+%><html>
+    <head>
+        <link rel="stylesheet" href="docroot/ui/default.css" type="text/css" title="style" />
+    </head>
+    <body style="margin-top:0px;border-width:0px">
+        <table width="100%">
+            <tr>
+                <td colspan="3" id="technavcell">
+                    <div id="technav">
+                    <%
+                    if (mode == null || !mode.equals("view")) {
+                        %><span class="technavat">New Test</span><a href="config.jsp?mode=view">View Results</a><%
+                    } else {
+                        %><a href="config.jsp?mode=">New Test</a><span class="technavat">View Results</span></a><%
+                    }
+                        %>
+                    </div>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="3">
+                    <%
+                    if (mode == null || !mode.equals("view")) {
+                        Map props = WebAppTestConfig.getOriConfig();
+                        props.putAll(WebAppTestConfig.getConfig());
+                        %>
+                        <form name="test" action="graph.jsp" target="graph">
+                            <table>
+                                <tr class="content"><td class="content">Repository Lookup Name</td><td class="content"><input name="<%= JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP %>" value="<%= props.get(JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP) %>"></td><td class="content">Workspace Name</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME) %>"></td><td class="content">Description</td><td class="content"><input name="desc"></td><td>&nbsp;</td><td><input class="submit" type="submit" value="start"></td><td><input type="hidden" name="mode" value="testnow"</td></tr>
+                                <tr><td class="content">Superuser Name</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME) %>"></td><td class="content">NodeType</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE) %>"></td></tr>
+                                <tr><td class="content">Superuser Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD) %>"></td><td class="content">Node Name 1</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1) %>"></td></tr>
+                                <tr><td class="content">ReadWrite User Id</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME) %>"></td><td class="content">Node Name 2</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2) %>"></td></tr>
+                                <tr><td class="content">ReadWrite User Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_PWD) %>"></td><td class="content">Node Name 3</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3) %>"></td></tr>
+                                <tr><td class="content">Readonly User Id</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_NAME) %>"></td><td class="content">Naming Factory Name</td><td class="content"><input name="java.naming.factory.initial" value="<%= props.get("java.naming.factory.initial") %>"></td></tr>
+                                <tr><td class="content">Readonly User Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_PWD) %>"></td><td class="content">Naming Provider Url</td><td class="content"><input name="java.naming.provider.url" value="<%= props.get("java.naming.provider.url") %>"></td></tr>
+                                <tr><td class="content">Test Root Path</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_TESTROOT %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_TESTROOT) %>"></td></tr>
+                            </table>
+                        </form>
+                    <%
+                    } else {
+                        %>
+                        <form name="view" action="graph.jsp" target="graph">
+                        <input type="hidden" name="mode" value="view">
+                        <table>
+                        <%
+                        Node rootNode = repSession.getRootNode();
+
+                        if (rootNode.hasNode("testing")) {
+                            %>
+                            <tr><td class="graph" valign="top">Select test to be viewed</td><td>
+                            <select name="test" size="10" onchange="document.view.submit();">
+                            <%
+                            NodeIterator tests = rootNode.getNode("testing").getNodes();
+
+                            ArrayList al = new ArrayList();
+                            //hack : todo??
+                            while (tests.hasNext()) {
+                                al.add(tests.nextNode());
+                            }
+
+                            Collections.reverse(al);
+                            Iterator itr = al.iterator();
+                            // eoh
+
+                            while (itr.hasNext()) {
+                                Node n = (Node) itr.next();
+                                String sdate = n.getName();
+                                Calendar cal = Calendar.getInstance();
+                                cal.setTimeInMillis(Long.parseLong(sdate));
+                                SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");
+                                sdate = formatter.format(cal.getTime());
+                                %><option value="<%= n.getName() %>"><%= sdate %><%
+                            }
+                            %>
+                            </select>
+
+                            </td></tr>
+                        <%
+                        }
+                        %>
+                        </table>
+                        </form>
+                        <%
+                    }
+                    %>
+                </td>
+            </tr>
+        </table>
+    </body>
+</html>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/clear.png
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/clear.png?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/clear.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/error.png
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/error.png?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/error.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/failure.png
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/failure.png?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/failure.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/pass.png
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/pass.png?view=auto&rev=149255
==============================================================================
Binary file - no diff available.

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/pass.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css?view=auto&rev=149255
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css (added)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css Mon Jan 31 05:17:24 2005
@@ -0,0 +1,515 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* CSS Document */
+
+body
+	{
+	font-family: Verdana, Arial, Helvetica, san-serif;
+	background-color: #ffffff;
+	padding: 0px;
+	margin: 0px;
+	margin-top: 30px;
+	vertical-align: top;
+	text-align: left;
+	}
+
+br
+    {
+    line-height:20px;
+    }
+
+table
+	{
+	text-align: left;
+	padding: 0px;
+	margin: 0px;
+	border: 0px solid #66dd44;
+	}
+
+
+table.content
+	{
+	postion: absolute;
+	font-size: 10px;
+	line-height: 13px;
+	border: 0px solid #66dd44;
+	border-top: 1px solid #cccccc;
+	padding: 0px;
+	margin: 0px;
+	margin-top: 26px;
+	margin-bottom: 26px;
+	width: 718px;
+	text-align: left;
+	}
+
+td.content
+	{
+	color: #333333;
+	border: 0px solid #66dd44;
+	border-bottom: 1px solid #cccccc;
+	border-right: 0px solid #cccccc;
+	border-left: 0px solid #cccccc;
+	vertical-align: top;
+	padding: 3px;
+	padding-left: 10px;
+	}
+
+td.graph
+    {
+    font-size: 11px;
+    padding-left: 10px;
+    color: #333333;
+    }
+
+
+td.disabled
+    {
+    color:#999999;
+    }
+
+th.content
+	{
+	color: #333333;
+	border: 0px solid #66dd44;
+	border-bottom: 1px solid #cccccc;
+	text-align: left;
+	padding: 5px;
+	padding-left:10px;
+	}
+
+th.container
+    {
+    color:#6181A9;
+    background-color:#f0f0f0;
+    }
+
+th.important
+    {
+    color:#B81833;
+    }
+
+.important
+    {
+    color:#B81833;
+    }
+
+#maintable
+	{
+	postion: absolute;
+	font-size: 10px;
+	line-height: 13px;
+	border: 1px solid #000000;
+	padding: 0px;
+	margin: 0px;
+	width: 960px;
+	}
+
+
+
+.toolcell
+	{
+	font-size: 10px;
+	color: #999999;
+	line-height: 10px;
+	background-color: #000000;
+	height: 18px;
+	width: 960px;
+	padding: 0px;
+	padding-bottom: 1px;
+	text-align: left;
+	}
+
+.toolcell A:link
+	{
+	color: #C5E2EE;
+	text-decoration: none;
+	}
+
+.toolcell A:visited
+	{
+	color: #C5E2EE;
+	text-decoration: none;
+	}
+
+.toolcell A:hover
+	{
+	color: #99FF33;
+	text-decoration: none;
+	border-bottom: 1px solid;
+	}
+
+.toolcell A:active
+	{
+	color: #FFFFFF;
+	text-decoration: none;
+	}
+
+.leadcell
+	{
+	margin: 0px;
+	padding: 0px;
+	border: 0px solid #000000;
+	width: 718px;
+	height: 100px;
+	background-image: url(../imgs/banner_left.jpg);
+	vertical-align: top;
+	}
+
+.leadcelltext
+	{
+	position: absolute;
+	border: 0px solid #000000;
+	font-size: 26px;
+	line-height: 32px;
+	margin-top: 5px;
+	margin-left: 8px;
+	color: #ffffff;
+	vertical-align: top;
+	}
+
+.logocell
+	{
+	border-left: 1px solid #000000;
+	width: 239px;
+	background-image: url(../imgs/banner_right.jpg);
+	align:right;
+	}
+
+#technavcell
+	{
+	font-size: 10px;
+	font-weight: bold;
+	border: 0px solid #000000;
+	border-top: 1px solid #000000;
+	height: 21px;
+	background-color: #6181A9;
+	}
+
+#technav
+	{
+	float: left;
+	display: block;
+	font-size: 10px;
+	line-height: 20px;
+	font-weight: bold;
+	color: #000000;
+	height: 21px;
+	border: 0px solid #000000;
+	padding: 0px;
+	background-color: #ffffff;
+	}
+.technavat
+	{
+	cursor:default;
+	float: left;
+	display: block;
+	font-size: 10px;
+	line-height: 20px;
+	font-weight: bold;
+	color: #000000;
+	height: 21px;
+	border: 0px solid #000000;
+	border-right: 1px solid #000000;
+	padding: 0px 10px 0px 10px;
+	background-color: #B6CAE4;
+	}
+#technav A:link
+	{
+	float: left;
+	display: block;
+	color: #ffffff;
+	border: 0px solid #000000;
+	border-right: 1px solid #000000;
+	height: 21px;
+	text-decoration: none;
+	padding: 0px 10px 0px 10px;
+	background-color: #6181A9;
+	}
+#technav A:visited
+	{
+	float: left;
+	display: block;
+	color: #ffffff;
+	border-right: 1px solid #000000;
+	height: 21px;
+	text-decoration: none;
+	padding: 0px 10px 0px 10px;
+	background-color: #6181A9;
+	}
+#technav A:hover
+	{
+	float: left;
+	display: block;
+	color: #ffffff;
+	border-right: 1px solid #000000;
+	height: 21px;
+	text-decoration: none;
+	padding: 0px 10px 0px 10px;
+	background-color: #000000;
+	}
+#technav A:active
+	{
+	float: left;
+	display: block;
+	color: #ffffff;
+	border-right: 1px solid #000000;
+	height: 21px;
+	text-decoration: none;
+	padding: 0px 10px 0px 10px;
+	background-color: #6181A9;
+	}
+
+.techcontentcell
+	{
+	width: 718px;
+	border: 0px solid #000000;
+	border-top: 1px solid #000000;
+	}
+
+.relatedcell
+	{
+	border-left: 1px solid #000000;
+	border-top: 1px solid #000000;
+	width: 239px;
+	background-color: #EBF0F6;
+	}
+
+.claimcell
+	{
+	width: 715px;
+	font-size: 10px;
+	color: #ffffff;
+	line-height: 10px;
+	background-color: #000000;
+	height: 18px;
+	padding: 0px;
+	padding-bottom: 1px;
+	}
+
+.claimcell A:link
+	{
+	color: #C5E2EE;
+	text-decoration: none;
+	}
+
+.claimcell A:visited
+	{
+	color: #C5E2EE;
+	text-decoration: none;
+	}
+
+.claimcell A:hover
+	{
+	color: #99FF33;
+	text-decoration: none;
+	border-bottom: 1px solid;
+	}
+
+.claimcell A:active
+	{
+	color: #FFFFFF;
+	text-decoration: none;
+	}
+
+/* CENTRAL CONTENT AREA STYLING */
+
+.content
+	{
+	position: relative;
+	margin: 25px;
+	font-size: 11px;
+	line-height: 16px;
+	color: #000000;
+	}
+
+.content A:link
+	{
+	color: #336600;
+	text-decoration: underline;
+	}
+
+.content A:visited
+	{
+	color: #666666;
+	text-decoration: underline;
+	}
+
+.content A:hover
+	{
+	color: #ffffff;
+	background-color: #336600;
+	text-decoration: none;
+	}
+
+.content A:active
+	{
+	color: #ffffff;
+	background-color: #000000;
+	text-decoration: none;
+	}
+
+
+
+/* TEXT STYLING */
+
+h1, h2, h3, h4, h5, h6, p
+
+	{
+	margin: 0px;
+	margin-bottom: 8px;
+	font-size: 11px;
+	line-height: 16px;
+	font-weight:bold;
+	}
+
+
+h1
+	{
+	color: #000000;
+	margin-top: 32px;
+	clear: left;
+	}
+
+
+h2
+	{
+	color: #336699;
+	}
+
+
+h3
+	{
+	color: #336699;
+	}
+
+p
+	{
+	font-size: 11px;
+	line-height: 16px;
+	font-weight: normal;
+	color: #000000;
+	}
+
+/* FORMS */
+
+form
+	{
+	font-size: 9px;
+	border-top: 0px solid #000000;
+	border-bottom: 0px solid #000000;
+	border-left: 0px solid #000000;
+	border-right: 0px solid #000000;
+	margin: 0;
+	padding: 0;
+	clear: left;
+	}
+select, textarea
+	{
+	font-family: Verdana, Arial, Helvetica, san-serif;
+	font-size: 9px;
+	font-weight: normal;
+	display: block;
+	float: left;
+	padding-top: 3px;
+	margin-bottom: 10px;
+	}
+.input
+	{
+	font-family: Verdana, Arial, Helvetica, san-serif;
+	font-size: 8px;
+	font-weight: normal;
+	color: #184054;
+	background-color: #f0f0f0;
+	border: 1px solid #999999;
+	border-bottom: 1px solid #cccccc;
+	border-right: 1px solid #cccccc;
+	}
+
+.submit
+	{
+	cursor:default;
+	width:60px;
+	font-family: Verdana, Arial, Helvetica, san-serif;
+	font-size: 10px;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	height: 20px;
+	padding: 0px;
+	padding-bottom: 1px;
+	margin: 0px;
+	border: 1px solid #cccccc;
+	border-bottom: 1px solid #666666;
+	border-right: 1px solid #666666;
+	}
+
+input.important
+    {
+    background-color:#B81833;
+    color:#ffffff;
+    }
+
+select
+	{
+	color: #184054;
+	background-color: #f0f0f0;
+	border: 0px solid #999999;
+	}
+textarea
+	{
+	color: #184054;
+	background-color: #f0f0f0;
+	width: 234px;
+	height: 100px;
+	border: 1px solid #999999;
+	border-bottom: 1px solid #cccccc;
+	border-right: 1px solid #cccccc;
+	}
+.clearleft
+	{
+	clear: left;
+	}
+.clearboth
+	{
+	clear: both;
+	}
+
+.checkradio
+	{
+	background-color: #ffffff;
+	width: 20px;
+	padding: 0px;
+	padding-bottom: 10px;
+	margin: 0px;
+	margin-top: 2px;
+	border: 0px solid #999999;
+	}
+
+.checkradiotext
+	{
+	font-size: 9px;
+	font-weight: normal;
+	line-height: 11px;
+	width: 100px;
+	color: #000000;
+	padding: 0px;
+	padding-bottom: 10px;
+	margin: 0px;
+	margin-top: 4px;
+	border: 0px solid #999999;
+	}
+

Propchange: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css
------------------------------------------------------------------------------
    svn:eol-style = native