converted to 1.6 markup
|No differences found!|
When you use Slide with Tomcat 4.1 you have several options ( I presume ) and when someone knows what those options are they can put them here. The Tomcat howto "Configure Catalina to use realm wrappers.catalina.SlideRealm so that Catalina authenticates users based on users defined in the Slide namespace" is obviously not enough info for anyone that doesn't know what to do.
From: Richard Emberson Subject: HOW-TO: SlideRealm Date: Thu, 19 Jun 2003 13:59:22 -0700
HOW-TO: SlideRealm, Tomcat, and Domain.xml (Slide version: nightly 06/18) (based upon Ridge Ren's Using Slide Realm posting Sun, 29 Sep 2002)
1. Uncommented the <security-constraint> in slide web.xml
2. Replace the Realm in Tomcat server.xml with:
<Realm className="wrappers.catalina.SlideRealm" name="Slide DAV Server" namespace="slide" />
alternatively (if you cannot change the global Realm or want to keep it for other applications, like the Tomcat Admin app) you can use the following modifications to server.xml
<Context path="/slide" debug="0" privileged="true" useNaming="true"> <Realm className="wrappers.catalina.SlideRealm" debug="9" name="Slide DAV Server" namespace="slide" /> </Context>
This will activate the Slide Realm only for the Slide application at /slide (has been tested with Tomcat 5.1.x, should also work with Tomcat 4.1.x).
3. Copy all (yeah all) of the slide jars to the $TOMCAT_HOME/common/lib directory (this is needed because adding the SlideRealm class to Tomcat pulls in the rest of Slide). Copy slide-catalinawrapper.jar from the distribution \jakarta-slide-1.0.16\server\server\lib to \Apache Group\Tomcat 4.1\server\lib
4. Now what the heck to do about slide.properties, that is, how to find the location of Domain.xml. You see, now that Slide is being loaded not as a servlet but as a part of the Tomcat core, the location of Domain.xml is not relative to some webapps location. So, first, the Slide class org/apache/slide/util/Configuration.java is where the one (or more!!) slide.properties are loaded.
First, it tries to load /org/apache/slide/slide.properties as a resource from the $TOMCAT_HOME/common/lib/slide-kernel.jar. Second, it looks for the file $JAVA_HOME/lib/slide.properties and if found it loads it.
Lastly, it tries to load the resource /slide.properties. If one places a slide.properties file in the directory $TOMCAT_HOME/common/classes, this step will load the file (note: not the $TOMCAT_HOME/shared/classes directory because we are loading at Tomcat startup, not servlet invocation). In the log you will see the message: "Configuration found in classpath" indicating that it found this version of the slide.properties file (in fact, this shows up twice in the log, Configuration.load() is called twice, and I think its because there are more than one Class Loaders involved??).
Clearly, messing around with the slide.properties in slide-kernel.jar is not the way to go until you've worked out all the property settings. Rather, simply put a copy of the slide.properties in $TOMCAT_HOME/common/classes and define the location of the Domain.xml file there. Because Slide is being loaded as part of Tomcat, the value of the System property "user.dir" is the Tomcat bin directory, $TOMCAT_HOME/bin, and this is where all relative directory locations are from. The class org.apache.slide.common.Domain simply tries to load the file with the implicit parent directory System.getProperty("user.dir") and the file name that is the value of the property "org.apache.slide.domain". If it can not find the file the error message simply contains the value of the property "org.apache.slide.domain"; it does not tell you what the implicit parent directory is, i.e., where the heck it thinks the file is.
I simply use the following setting: org.apache.slide.domain=../webapps/slide/Domain.xml
5. Commented out the JMX MBean in server.xml to fix MBean exception.
Note that the password property that is used to get the password for a user needs to be set with the proper namespace attribute. Check the database and compare with the Domain.xml sample configuration.
Additional note 2: The namespace attribute should have value: http://jakarta.apache.org/slide/