How to install WebDAV server in an existing Tomcat 5

Hi. I (think) I have succeeded into making Tamino WebDAV server (TWS) run into an existing Tomcat 5, including URM security. I did so because I already have a Tomcat running here and I did not want to have another instance.

This is what (I think) I have done:

a) Standard installation of TWS with security

  • If your DB has already tamino authentication enabled (mine had):
    . Reserve a user for being used by WebDAV (e.g. create a new one). The default is “inodavuser”. The default password is “tws”, but I guess it is not the most secure option to use it. Also, I found restrictions on changing passwords later (see end of post). In theory you can use a domain (I did not.)
    . Just for clearing out problems, if you created a new user add it to the ino:admin administrative user group. If this user group does not exist, create it before. It is special.

  • Install Tamino WebDAV server using the standard installation (creates separate tomcat 4 installation etc)

  • If for TWS to access the Tamino DB you plan to utilize a user other than “inodavuser” with a password different from “tws”, edit $TWS_HOME\tws\Domain.xml, search for “inodavuser” and change user name and password accordingly. If the user has a domain, you need to add a new parameter (search the TWS documentation).

  • Start standard TWS (if port 8080 is gotten by other servers, shut down them and/or change it on $TWS_HOME\tws\tomcat\conf\server.xml) . Better start it not as a service, to see the console and look for errors.

  • Just to check that everything works, create a collection and some file on it.

  • Enable TWS security as described in the documentation (create urmDB , inodavconfig, etc ). Watch out when creating the user for it, and ensure your current administrator user has also privileges on the DB before rebooting it. I enabled OS authentication.
    . You may have to manually reboot TWS after that (I got an exception on Tomcat TWS console).

  • Check that everything works fine with your collection and the security

  • Shut down TWS

b) Installing TWS on existing Tomcat 5

  • Shut down standard Tomcat 5 if running

  • Decompress taminowebdavserver.war into a new subdirectory of $TOMCAT_HOME/webapps, with the name of your choice, and:
    . Replace the decompressed Domain.xml file with $TWS_HOME/tws/Domain.xml
    . Replace the decompressed WEB-INF/web.xml file with $TWS_HOME/tws/WEB-INF/web.xml
    . Replace the decompressed WEB-INF/classes/ file with $TWS_HOME/tws/WEB-INF/classes/
    . Delete (or rename to a extension other than .jar) the following files from the lib subdirectory: log4j-1.2.8.jar , TaminoAPI4J.jar, tws-urm.jar (otherwise, they conflict with the ones installed into Tomcat in next step)

  • Copy into Tomcat the following files from TWS installation:
    . copy $TWS_HOME/tomcat/native/lib/*.dll to $TOMCAT_HOME/bin
    . copy $TWS_HOME/tomcat/common/lib/{log4j-1.2.8.jar, sagssxtamino.jar, sagssxuserdb.jar, TaminoAPI4J.jar, tws-ssx.jar, tws-urm.jar} to $TOMCAT_HOME/common/lib
    . copy $TWS_HOME/tomcat/server/classes/tws-descriptors.xml to $TOMCAT_HOME/server/classes (I think it is not needed, but anyway)
    . copy $TWS_HOME/tomcat/server/lib/tws-urmrealm.jar to $TOMCAT_HOME/server/lib
    . copy $TWS_HOME/tomcat/conf/urm_config.xml to $TOMCAT_HOME

  • Edit $TOMCAT_HOME/conf/server.xml and:
    . Search for “<Realm”
    . After (or before) one of these tags, add this new one:

<Realm className="org.apache.slide.urm.realm.URMRealm" configFile="urm_config.xml" />
In standard TWS the URM realm is installed by changing the <Listener> tag, but this did not work with my Tomcat 5.

This seems to work for me. It should be possible to create new collections, too (no need to create them from original TWS).

I guess the standard TWS installation should be used only if some TWS console command has to be used, since TWS console commands may not work with the Tomcat5 installation, because they directly access the $TWS_HOME directory. Some of them allow to specify the location of the Domain.xml file, but some don’t. In this case, the trick would be to do the change in TWS and then copy config files to Tomcat5.

What I think may be a problem is changing the password of the Tamino user utilized by WebDAV - I once did and I entered into a situation I could not access the collection any more, even after editing the Domain.xml file or changing the password back to its original value. Something strange here.