Recent version of the Lotus Domino web server have had the ability to host Java servlets, but at the time of writing the Domino servlet container uses JDK 1.2.2 and it is not (apparently) possible to replace this with JDK 1.3. That means if you want to use JAAS or any other API that is JDK 1.3 only in your servlets you're stuck.
Doubtless you're anxious to get started, so jump directly to Building (NT, Linux) or Installing (NT, Linux).
Firstly unpack the source archive and move the directory called "domino" into your Tomcat source tree as (e.g.)
D:\Works\Tomcat\jakarta-tomcat\src\native\domino
In other words place domino in the same directory as the other native code elements such as "iis" and "netscape". Now open the project file "dsapi.dsw" in Visual C++. As distributed the project refers to a number of file paths on the system that were used during development which will likely be different on the system you're using. Unless these are set correctly the project will not build. To check these go to the project settings page (Alt-F7). Select "All Configurations" in the Settings For: picker and go to the "C/C++" tab. Select "Preprocessor" from the Category: picker.
Have a look in the Additional include directories: field. It contains a number of file paths separated by commas. You need to replace these file paths with the appropriate ones for your system. Specifically you need to replace "C:\JBuilder4\jdk1.3" with the path to your JDK1.3 directory and "C:\notesapi" with the path to your Lotus Notes C API installation.
When you've fixed those paths visit the "Link" tab. Under Category: "Input" check the Additional library path: field. Again this refers to the Lotes Notes C API installation and may need to be updated to reflect where you have it installed.
Once these paths are correctly set you should be able compile the project by hitting F7 or selecting the appropriate option from the Build menu. Assuming all goes well a new directory called Release will appear below the project directory and, when the build is complete, the file tomcat_redirector.dll will appear in this directory.
C:\> full path to tomcat\bin\tomcat run
If everything is set up correctly Tomcat should start and it should be possible to connect to your server on port 8080 using a browser. Try something like
http://name of server:8080/
which, assuming Tomcat is still in its default state will produce the examples page. You need to make sure that you have a working Tomcat installation before continuing with these instructions. If you have problems with installing or configuring Tomcat, you'd better go here: http://jakarta.apache.org/tomcat/.
Once you've got a working Tomcat, copy the file tomcat_redirector.dll to the Domino program directory (this is the directory, which may be called something like C:\Lotus\Domino, that contains a file called nlnotes.exe). Shortly we will tell Domino where to find this file, but before we do that we need to make some registry entries. The simplest way is to edit the supplied file tomcat_redirector.reg, which initially will look like this
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Dsapi Redirector\1.0] "log_file"="D:\\tomcat\\logs\\domino.log" "log_level"="debug" "worker_file"="D:\\tomcat\\conf\\workers.properties" "worker_mount_file"="D:\\tomcat\\conf\\uriworkermap.properties" "tomcat_start"="D:\\tomcat\\bin\\tomcat.bat start" "tomcat_stop"="D:\\tomcat\\bin\\tomcat.bat stop"Edit this file to reflect the location where Tomcat has been installed, i.e. replace the instances of D:\\tomcat with the appropriate path remembering to retain the double backslashes. Once you've made the necessary changes save this file and double click on it to enter it into the registry.
Note that the files referred to by the worker_file and worker_mount_file keys need to exist and contain sane values. Default Tomcat installations will have these files. Note also that recent versions of Tomcat write a file called uriworkermap.properties-auto when they start up that can be renamed uriworkermap.properties to obtain default behaviour.
Assuming you know your way around a Domino server document what we're going to do is actually quite simple. Open the server document for this server, place it in Edit mode, then locate the DSAPIsection and the 'DSAPI filter file names' field on the Internet Protocols tab, HTTP sub-tab. Add "tomcat_redirector.dll" to the DSAPI field, then save and close the document.
29/05/2001 18:54:13 JVM: Java Virtual Machine initialized. 29/05/2001 18:54:14 Attempting to start Tomcat: C:\tomcat\bin\tomcat.bat start Including all jars in C:\Tomcat\lib in your CLASSPATH. Using CLASSPATH: C:\Tomcat\classes;C:\Tomcat\lib\ant.jar;C:\Tomcat\lib\servlet.jar Starting Tomcat in new window 29/05/2001 18:54:15 Apache Tomcat Interceptor (Jakarta/DSAPI/1.0) loaded 29/05/2001 18:54:16 HTTP Web Server startedAt about the same time Tomcat should open in a new window (assuming you enabled the autostart option in the registry settings). You should now be able to visit a URL that is handled by Tomcat. Something like
http://name of server/servlet/SnoopServlet
may be available, depending on how Tomcat is configured. If that all works you're done ;-)
Firstly unpack the source archive and move the directory called "domino" into your Tomcat source tree as (e.g.)
/usr/src/tomcat/jakarta-tomcat/src/native/domino
In other words place domino in the same directory as the other native code elements such as "iis" and "netscape".
Next edit the Makefile providing appropriate values for these variables:
# The root of your Domino installation. Mine's in /usr/local/lotus, but your's # may well be /opt/lotus NOTESROOT=/usr/local/lotus # The place where the Notes API is installed NOTESAPI=$(NOTESROOT)/notesapi # The Domino program directory. NOTESHOME=$(NOTESROOT)/notes/5061/linux # The Domino data directory (the directory containing names.nsf) NOTESDATA=$(NOTESROOT)/notes/data # The include path for the Notes C API headers NOTESINC=$(NOTESAPI)/include # Where tomcat is installed. This is where conf, lib, webapps et al normally are TOMCATHOME=/usr/local/apache/tomcat # Your JDK's include directory JAVAINC=$(JAVA_HOME)/includeOnce that's done you should be able to type
$ make
to build the redirector and, assuming that worked, type
$ make install
to place the redirector (libtomcat.so) and its settings file (libtomcat.ini) in the appropriate places (the Domino program and data directories respectively).
$ full path to tomcat/bin/tomcat.sh run
If everything is set up correctly Tomcat should start and it should be possible to connect to your server on port 8080 using a browser. Try something like
http://name of server:8080/
which, assuming Tomcat is still in its default state will produce the examples page. You need to make sure that you have a working Tomcat installation before continuing with these instructions. If you have problems with installing or configuring Tomcat, you'd better go here: http://jakarta.apache.org/tomcat/.
Once you've got a working Tomcat, copy the file libtomcat.so to the Domino program directory (this is the directory, which may be called something like /opt/lotus/notes/5601/linux, that contains a file called libnotes.so) and libtomcat.ini to the Domino data directory. Note that if you're building the redirector from source these files should already have been copied to the appropriate locations. Before using the redirector you may like to review the settings in libtomcat.ini which, by default, will look something like this:
log_file=/usr/local/apache/tomcat/logs/domino.log log_level=debug worker_file=/usr/local/apache/tomcat/conf/workers.properties worker_mount_file=/usr/local/apache/tomcat/conf/uriworkermap.properties tomcat_start=/usr/local/apache/tomcat/bin/tomcat.sh start tomcat_stop=/usr/local/apache/tomcat/bin/tomcat.sh stopIf you're building the redirector from the source you may not need to make any changes, otherwise you may have to edit this file to reflect the location where Tomcat has been installed, i.e. replace the instances of /usr/local/apache/tomcat with the appropriate path.
Note that the files referred to by the worker_file and worker_mount_file keys need to exist and contain sane values. Default Tomcat installations will have these files. Note also that recent versions of Tomcat write a file called uriworkermap.properties-auto when they start up that can be renamed uriworkermap.properties to obtain default behaviour.
Assuming you know your way around a Domino server document what we're going to do is actually quite simple. Open the server document for this server, place it in Edit mode, then locate the DSAPIsection and the 'DSAPI filter file names' field on the Internet Protocols tab, HTTP sub-tab. Add "libtomcat.so" to the DSAPI field, then save and close the document.
tell http quit
then
load http
You should see the HTTP server reload along with messages that will confirm that the redirector has loaded and that Tomcat has (if you used Tomcat autostart) started. You should now be able to visit a URL that is handled by Tomcat. Something like
http://name of server/servlet/SnoopServlet
may be available, depending on how Tomcat is configured.