hgomez 01/06/01 01:50:40 Added: jk/src/doc tomcat-domino-howto.html Log: Documentation on Domino and Tomcat Revision Changes Path 1.1 jakarta-tomcat-connectors/jk/src/doc/tomcat-domino-howto.html Index: tomcat-domino-howto.html ===================================================================
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.
Firstly move the directory called "domino" into your Tomcat source tree as (e.g.)
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 was 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.
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 DSAPI 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.