ContentsPreviousNextTomcat-Book Project

As mentioned above, the redirector for the iPlanet server is called the NSAPI Redirector. This section describes how to get or make, and install the NSAPI Redirector.

As of Tomcat 3.2 if you downloaded and binary version of Tomcat you already have a compiled version of the NSAPI Redirector. If this is the case skip down to step 4, if not then start at step 1. NOTE: In order to build the redirector you must have Visual C++ 6.0 or above.

  1. Change directory to TOMCAT_HOME/native/mod_jk/netscape

  2. If it's not already set, set an eviornment variable called NS_HOME to the installation location of your iPlanet server.

    <substep> //HOW DO I SET ENV VARS IN WINDOWS// </substep>
  3. Execute the following commmand: MSDEV nsapi.dsp /MAKE ALL

  4. Copy TOMCAT_HOME/native/mod_jk/netscape/nsapi_redirect.dll into TOMCAT_HOME/bin/win32

  5. Disable the builtin Servlet support if it's enabled.

  6. Add the following lines in the server's obj.conf file, located at //INSERT PATH//

    • In the Init section:

      Init fn="load-module" funcs="jk_init,jk_service"

      shlib="TOMCAT_HOME/bin/win32/nsapi_redirect.dll"

      Init fn="jk_init" worker_file="TOMCAT_HOME/conf/workers.properties"

      log_level="debug" log_file="TOMCAT_HOME/logs/nsapi.log"

    • In the default object NameTrans section:

      NameTrans fn="assign-name" from="/servlet/*" name="servlet"

      NameTrans fn="assign-name" from="/examples/" name="servlet"

    • Create a new object by adding the following lines at the end of the obj.conf file

      <Object name="servlet">

      ObjectType fn="force-type" type="text/plain"

      Service fn="jk_service" worker="ajp12"

      </Object>

  1. Change into directory TOMCAT_HOME/native/mod_jk/netscape

  2. Set the enviornmental variable SUITSPOT_HOME to point to the install location of the iPlanet server. //HOW//

  3. Verify that you have the GNU C compiler on you system. To do this type gcc -v. You should see something similar to this "gcc version 2.96".

  4. Verify that you have the GNU Make system installed. To do this type gmake -v. You should see something similar to this "GNU Make 3.79.1".

  5. Compile the NSAPI Redirector by executing gmake -f Makefile.solaris

  6. Copy TOMCAT_HOME/native/mod_jk/netscape/nsapi_redirector.so into TOMCAT_HOME/bin/solaris

  7. Disable the builtin Servlet support if it's enabled.

  8. Add the following lines in the server's obj.conf file, located at //INSERT PATH//

    • In the Init section:

      Init fn="load-module" funcs="jk_init,jk_service"

      shlib="TOMCAT_HOME/bin/solaris/nsapi_redirector.so"

      Init fn="jk_init" worker_file="TOMCAT_HOME/conf/workers.properties"

      log_level="debug" log_file="TOMCAT_HOME/logs/nsapi.log"

    • In the default object NameTrans section:

      NameTrans fn="assign-name" from="/servlet/*" name="servlet"

      NameTrans fn="assign-name" from="/examples/" name="servlet"

    • Create a new object by adding the following lines at the end of the obj.conf file

      <Object name="servlet">

      ObjectType fn="force-type" type="text/plain"

      Service fn="jk_service" worker="ajp12"

      </Object>

Now that you have both the iPlanet server and Tomcat set up you will want to test them. Start, or restart, the iPlanet server then start Tomcat. Open up your browser and go to http://your.server/examples. You should be able to view the Tomcat example JSPs and Servlets. If you can not, double check the steps above and refer to the Troubleshooting section at the end of this chapter.

ContentsPreviousNext