CCL Home Page
Up Directory CCL README.html
Date: Wed, 8 Nov 2000 14:38:12 +1000 
From: "Jansen, Rene" <>
To: "''" <>
Subject: Tomcat 3.2beta5 page

Came a long a few examples where I think some type errors might have
ocurred. In the latest server.xml the Normal HTTP Connector  ( 5080 ) is
still there, shouldn't this be left out, further first ajp12 is changed to
ajp13 and later without reason it's being back to ajp12 (mod_jk.conf) also
port numbers have swapped between these.

First thanks for noticing it...
Yes... I messed up a little... The reason is that I tried the latest
and greatest ajp13, but mod_jk has problems with it when one does
basic authentication and uses SSL in Apache. So I changed back
to ajp12. The examples reflect the situation after reverting to ajp12, but
the installation log below did not talk about my ordeal with the ajp13 bug.

Therefore I decided now to include both versions of files there:
with ajp12 as JSP/servlet connector, and one as ajp13 as JSP/servlet connector.
Note, the connector ajp12 has allways be present for TOMCAT to
be shut down, even if you use ajp13 to serve JSP/servlets. 
The 39) in:
was changed accordingly.


This is a log of my installation/Compilation of Apache DSO
with SSL, MM, and Tomcat 3.2beta5 (source distribution)
on SunOS heechee 5.7 Generic_106541-10 sun4u sparc SUNW,Ultra-250

YES, I TRIED BETA 6, but watchdog gives a lot of errors. I need to
further explore this issue...

  Apache -- the Web Server
  DSO -- Dynamic Shared Object (additional modules can be added/updated
         to Apache without the need to recompile the whole thing, similar
         to shared libraries, but but DSO modules are not only called, but
         can call routines withing Apache)
  MM  -- memory management or something like that - and add on to Apache
         and its modules to communicate via shared memory rather than files

  SSL -- Secure Socket Layer - the encryption and certificate package which
         works with Apache

  Tomcat -- the Java Server Pages (JSP) and Servlet container which uses the
         latest Java Servlets spec 2.2, and the latest JSP spec 1.1.
         It is still being actively developed and has some "features".

You may want to read my FAQ on Tomcat 3.1 beta 1. since it will be
easier to follow this installation log. It is available at:

I use GNU tar. It may be called gtar on your machine. If you do not have it,
try to do: 
     gunzup some.tar.gz
     tar xvf some.tar
rather than
     tar zxvf some.tar.gz

I assume you have moderately latest GNU tools (gmake, gzip, etc...) installed
and you also have a recent version of perl installed 

1) Be a root... Run ksh or other sh, but not C-shell.

2) Installed Java 1.3 under Solaris
    a) went to
    b) clicked on Products and API on the left bar
    c) at the middle of the page under COMPLETE PRODUCT LIST
       retrieved JDK at "JavaTM 2 SDK, Standard Edition, v 1.3"
    d) saved files in /tmp:
       did not do any patches

    e) unpacked archive
          chmod 755 j2sdk1_3_0-solsparc.bin
          mkdir /usr/local/java3
          cd /usr/local/java3

    f) this created directory /usr/local/java3/j2sdk1_3_0
          mv /usr/local/java3/j2sdk1_3_0 /usr/local/j2sdk1_3_0
          cd /usr/local
          ln -s /usr/local/j2sdk1_3_0 jdk1.3

3) Set your environment variables for Java (I am assuming you use
   some Bourne shell lookalike -- ksh or sh.

      export JAVA_HOME
      export PATH
      export CLASSPATH

4) Create directory /usr/local/openssl and retrieve latest release of openssl
     mkdir /usr/local/openssl
     cd /usr/local/openssl

5) Compiled the openssl [if you are in Europe, you need to
   check the mod_ssl INSTALL for the no-idea option. Note RSA released RSAREF
   to public domain, so I do not have to use RSAREF in US (I believe --
   I may be wrong).

     cd /usr/local/openssl
     gtar zxvf openssl-0.9.6.tar.gz
     cd openssl-0.9.6
     ./config -fPIC shared \
              --prefix=/usr/local/openssl \

     make test
     make install
     cp -p /usr/local/openssl/openssl-0.9.6/lib*.a /usr/local/openssl/lib

   Since the cp above created 3 identical copies of each library, I deleted
   2 copies, and made appropriate links:
     cd /usr/local/openssl/lib
     ln -s
     ln -s
     ln -s
     ln -s

6) Make top directory for Apache 1.3.12 installation. I did

     mkdir /usr/local/apache_1.3.14
  I also made a subdirectory "sources" to have all needed sources in one
     mkdir /usr/local/apache_1.3.14/sources
     cd /usr/local/apache_1.3.14/sources
   Put there the tar files:

   I also serve here local copies of some files (those which are not "munition"
   according to US export laws which are quite far from present reality).
7) Unpack sources to buld DSO Apache with mod_ssl and mm:

     cd /usr/local/apache_1.3.14
     cd sources
     gtar zxvf apache_1.3.14.tar.gz
     gtar zxvf mod_ssl-2.7.1-1.3.14.tar.gz
     gtar zxvf mm-1.1.3.tar.gz

8) Compiled MM shared memory library
     cd /usr/local/apache_1.3.14/sources/mm-1.1.3
     ./configure --disable-shared

9) Configured  mod_ssl
     cd /usr/local/apache_1.3.14/sources/mod_ssl-2.7.1-1.3.14
     ./configure \

10) Configure and make and install Apache with DSO support:
     cd /usr/local/apache_1.3.14/sources/apache_1.3.14
     SSL_BASE=/usr/local/openssl/openssl-0.9.6 \
     EAPI_MM=/usr/local/apache_1.3.14/sources/mm-1.1.3 \
     ./configure --prefix=/usr/local/apache_1.3.14 \
               --enable-module=so \
               --enable-rule=SHARED_CORE \
               --enable-module=most \
               --enable-shared=max \
               --enable-module=ssl \
   make certificate TYPE=custom
   make install

   My entries for certificates with 
          make certificate TYPE=custom
   were defaults, no passwords/passphrases, etc. and:
    STEP 0: R
    STEP 2:
     1. Country Name              [XY]:US
     2. State or Province Name    [Snake Desert]:Ohio
     3. Locality Name             [Snake Town]:Columbus
     4. Organization Name         [Snake Oil, Ltd]:OSC
     5. Organizational Unit Name  [Cer..Authority]:Gateway
     6. Common Name               [Snake Oil CA]
     7. Email Address             [ca@snakeoil.dom]
     8. Certificate Validity      [365]:1000

    STEP 3: 3
    STEP 5:
     1. Country Name              [XY]:US
     2. State or Province Name    [Snake Desert]:Ohio
     3. Locality Name             [Snake Town]:Columbus 
     4. Organization Name         [Snake Oil, Ltd]:OSC
     5. Organizational Unit Name  [Webserver Team]:PSE
     6. Common Name               [www.snakeoil.dom]
     7. Email Address             [www@snakeoil.dom]
     8. Certificate Validity      [365]:1001
    STEP 6: 3
    STEP 7:n
    STEP 8:n
    In fact, in my real case, after I did "make install", I overwrote
    the certificates created here with the real ones. I created "real"
    certificates a few months ago.  

11) Set the environment:

    export APACHE_HOME

12) edited a file in $APACHE_HOME/conf/httpd.conf (in my case:
      /usr/local/apache_1.3.14/conf/httpd.conf) and
    added (actually uncommented):
    Then changed ports not to confilct with other servers I am running.
      Port 80  --> Port 5180
      Listen 80 --> Listen 5180
      Listen 443 --> Listen 5143
      <VirtualHost _default_:443>  --> <VirtualHost _default_:5143>

13) Testing if Apache works:
    a) make sure other installation of apache is not running,
       or if it runs, it does not use port 5180 and port 5143.
       (do: ps -ef | grep httpd), and if httpd runs, kill it either
       with its own apachectl script, or if you do not know what it is
       just find the PID of the httpd process which is owned by root:
          ps -ef | grep root | grep httpd
       (PID is in the second column of the output from ps). Kill it first with
          kill PID
       and then find all other apaches:
          ps -ef |  grep httpd
       and kill them one by one.

    b) start apache with:
       /usr/local/apache_1.3.14/bin/apachectl startssl
       If you have warning, you have a problem, and try to
       do "exactly what I say" next time {:-)}.

    c) Use your browser (preferable on some other machine)
       and check if http: and https: work
       In my case, I tried URLs:
       In the https case you should get a lot of windows
       which ask you for accepting the certificate if you did not have
       https protocol from this site before, or with different certificates.
       Just click Next to the series of questions, and also mark
       "Keep this certificate forever" on one of the boxes.

    d) Stop apache, since you are not finshed yet.
       /usr/local/apache_1.3.14/bin/apachectl stop

        Building and installing tomcat

        At the time of this writing I was playing with 2 releases
        3.2beta5 (Sept 23, 2000) and 3,2beta6 (Oct 12, 2000).
        I decided to go with patched 3.2beta5 since it passed watchdog tests.

14) You need to get JAXP (Sun API and XML parsing in Java):
     click on Download JAXP reference implementation
     to get to:
     Click on "ZIP (all platforms)" and after legal mambo-jumbo
     get the (857807 bytes)
       mv jaxp1.0.1 /usr/local

     Place the jaxp.jar and parser.jar in your classpath
     export CLASSPATH

15) Create directory /usr/local/tomcat_3.2b5
     mkdir /usr/local/tomcat_3.2b5
   and put there the source release 3.2 beta 5 of tomcat:  
     cd /usr/local/tomcat_3.2b5

    I also have them here locally, if you want:
16) Untar them as:
        cd /usr/local/tomcat_3.2b5
        gtar zxvf jakarta-ant.tar.gz
        gtar zxvf jakarta-tomcat.tar.gz
        gtar zxvf jakarta-tools.tar.gz
        gtar zxvf jakarta-servletapi.tar.gz
        gtar zxvf jakarta-watchdog.tar.gz
    While I do not need most of them, just in case, I got them all to
    be in sync when I need them. Set the JAKARTA_HOME variable

       export JAKARTA_HOME

17) Installing/building  ANT -- the tool needed to build Tomcat
       cd $JAKARTA_HOME/jakarta-ant
       export ANT_HOME

18) Installing/building servlet API
       cd $JAKARTA_HOME/jakarta-servletapi
       chmod 755 
       ./ dist

19) Installing/building tomcat (unpacked)
       cd $JAKARTA_HOME/jakarta-tomcat
20) testing Tomcat  
        cd $JAKARTA_HOME/build/tomcat
        export TOMCAT_HOME

     My relevant environment (type: env at command line) at this point is:

     Since I have other Tomcats running on this machine, I changed
     the default ports in $TOMCAT_HOME/conf/server.xml
     cd /usr/local/tomcat_3.2b5/build/tomcat/conf
     emacs server.xml
         Change 8080 --> 5080
         Change 8007 --> 5007
     While the SSL connector is at this moment commented, I changed the
     the port 
                8443 --> 5443
     so I do not forget about it in the future.
     Note that server.xml is the file which is read in by Tomcat to
     configure itself. Tomcat does not use any information from or mod_jk.conf (may still use them to provide
     automatic configuration files for Apache, but I do not think it
     uses any information from these file for itself).
     The files like tomcat-apache.conf,, tomcat.conf
     are used when tomcat was working with mod_jserv module. We are using
     here mod_jk module, and these files can be ignored.

     Now, starting tomcat to test:

       cd $TOMCAT_HOME/bin
    then checked the stuff at tomcat port       

    and looked at test pages. Things worked... Then I shut it down as:


21)  At this point it may be prudent to make sure that environment is fine.
     I created a file $APACHE_HOME/bin/do_env which was:

        ---------------------- cut ---------        
        export JAVA_HOME

        export APACHE_HOME

        export JAKARTA_HOME

        export ANT_HOME

        export TOMCAT_HOME

        export CLASSPATH
        export PATH
        ---------------------- cut ---------        
     then I did:

         chmod 775 $APACHE_HOME/bin/do_env

     and whenever I wanted to reset my environment, I did:

         . $APACHE_HOME/bin/do_env

22)  Now, let us create the mod_jk module. This is a DSO object
     which you load into Apache. It is called "server plug-in"
     sometimes. What it does, it allows Apache to talk to Tomcat.
     Note that in this communication Apache (The web server) is a
     client of Tomcat. Tomcat is started, and it listens for requests
     from Apache (usually on port 8007, but since I have several 
     things running on this machine, I use different port, as you see).
     In the beta 5 release there is small bug (reported to
     tomcat-dev list by  "Mike Bremford" <>.
     It will probably be corrected before I finish this log. So check it
     out, before correcting corrected corrections {:-)}:
       The mod_jk build on Solaris (and probably any other Unix) was broken
       by the changes for Netware - the addition of native/jk/jk_nwmain.c and
       the change to native/jk/jk_global.h

     1. To fix jk_nwmain.c, add "#ifdef NETWARE ... #endif" around the ENTIRE

     2. To fix jk_global.h, move the #include <sys/socket.h> to just BEFORE the
       "#ifndef NETWARE" block, rather than just AFTER.

        So the block at the top of jk_global.h looks like
         #include <netinet/in.h>
         #include <sys/socket.h>
         #ifndef NETWARE
            #include <netinet/tcp.h>
            #include <arpa/inet.h>
            #include <sys/un.h>
            #include <sys/socketvar.h>
            #include <sys/select.h>
         #include <sys/time.h>
         #include <sys/ioctl.h>


      cd $JAKARTA_HOME/jakarta-tomcat/src/native/jk

         fix the stuff as described above.

      cd $JAKARTA_HOME/jakarta-tomcat/src/native      
      cd apache1.3
      $APACHE_HOME/bin/apxs -o -DSOLARIS \
           -I${JAVA_HOME}/include/solaris \
           -I../jk -I${JAVA_HOME}/include \
           -l posix4 -c *.c ../jk/*.c  
      cp ${APACHE_HOME}/libexec

23)   When I tested standalone Tomcat in 20),, it created automatically
      a config file for mod_jk for Apache which is available as:
      I did the following:
        cd $TOMCAT_HOME/conf
        mv mod_jk.conf mod_jk.conf.original
        mv mod_jk.conf-auto mod_jk.conf
      i.e., I saved the original and copied the automatic version to
      For the time being, I edited the Apache config file to include
      the mod_jk.conf (more needs to be done for sensible install, though).
      I edited file $APACHE_HOME/conf/httpd.conf and at the last line I put:
        Include /usr/local/tomcat_3.2b5/build/tomcat/conf/mod_jk.conf
      The actual initial httpd.conf is here.

      Replaced all occurances of ajp12 with ajp13 and made few other changes
      You can find the copy of it here.
      Made several changes to
      You can look up them here.
24) copied jaxp.jar and parser.jar to $TOMCAT_HOME/lib  
          cd $TOMCAT_HOME/lib
          cp /usr/local/jaxp1.0.1/jaxp.jar .
          cp /usr/local/jaxp1.0.1/parser.jar .

25) changed the $TOMCAT_HOME/conf/server.xml
    to activate the ajp13 connector
        <!-- Apache AJP13 support. -->
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
            <Parameter name="port" value="5007"/>
    Left ajp12 support since it is needed for shutdown.
    Also change ports.
    Look here for initial server.xml.

26) Started tomat
        cd $TOMCAT_HOME/bin

   (if you have errors, check if it is not running by any chance:
      ps -ef | grep tomcat
    and kill if needed.

27) Started Apache

   $APACHE_HOME/bin/apachectl startssl

   Things worked on port 5080(http) and 5143(https). I checked and 

28) Stopped Tomcat
        cd $TOMCAT_HOME/bin

29) Stopped Apache
       $APACHE_HOME/bin/apachectl stop

30) Compiled and installed watchdog. Watchdog is a batter of tests for your
    installation of Tomcat. It is usefull to look at sources
    (in my case under $JAKARTA_HOME/jakarta-watchdog/src/clients,
     you have to read $JAKARTA_HOME/jakarta-watchdog/doc/design to navigate
     through this maze).

   cd $JAKARTA_HOME/jakarta-watchdog
   ./ dist
   cd $JAKARTA_HOME/dist/watchdog/webapps
   cp *.war $TOMCAT_HOME/webapps

31) Started Tomcat stand alone and ran watchdog
       cd $JAKARTA_HOME/dist/watchdog/bin   
       ./ servlet 5080
            # gave me a lot of OK's, so I hope it is OK
       ./ jsp 5080
            # gave me a lot of OK's, so I hope it is OK

32) Reconfigured Tomcat and Apache to do things I want them to do.

    a) In $APACHE_HOME/conf/httpd.conf made sure mod_jk is before mod_rewrite

      LoadModule jk_module          libexec/
      LoadModule rewrite_module     libexec/


      AddModule mod_jk.c
      AddModule mod_rewrite.c

    and commented out the line
       # LoadModule jk_module libexec/
       # AddModule mod_jk.c

    in $TOMCAT_HOME/conf/mod_jk.conf

33) In the $APACHE_HOME/conf/httpd.conf I added some rewrite
         <IfModule mod_rewrite.c>
         RewriteEngine On
         RewriteLog /usr/local/apache_1.3.14/logs/rewrite_log
         RewriteLogLevel 2
         RewriteRule ^/ROOT/examples /examples [R]
         RewriteRule ^/ROOT/test /test [R]
         RewriteRule ^/ROOT/admin /admin [R]
         RewriteRule ^/ROOT/ROOT /ROOT [R]
         RewriteRule ^/tomcat.gif /ROOT/tomcat.gif [R]
         RewriteRule ^/examples/servlets$     /examples/servlets/  [R]
         RewriteRule ^/examples/jsp$     /examples/jsp/  [R]
         RewriteRule ^/examples$     /examples/  [R]
         RewriteRule ^/admin$          /admin/  [R]
         RewriteRule ^/ROOT$          /ROOT/  [R]
         RewriteRule ^/test$          /test/  [R]

    for the HTTP (port 5180) and HTTPS (virtual host at 5143). It was needed
    to cure a problem that $TOMCAT_HOME/webapps/ROOT
    is a Document Root for Tomcat, but for Apache, the 
    $APACHE_HOME/htdocs is the Document Root. 

34) Created new users, in my case webinst3, and webrun3, and groups for
    them, home directories, and regular login environment.  
    The webrun3 was assigned /bin/ksh and webinst3 had tcsh as primary
    shell (yes, I know that t/csh is brain dead, but people want it,
    and people will have it -- it sucks primarily with its limitations:
    "Word too long" when your environment variable is longer than 1024 --
    it happens to me all the time with longer CLASSPATHs).
    Note, that when you execute the script as
          su - uid -c script
    the script will be executed with the default shell (i.e., the shell
    the user uid has assigned in /etc/passwd)  of the uid user, and it does not
    matter what you put in #!/bin/someshell on the top of your script.
    The script is sourced with default shell, not forked with a new shell. 
    The webinst3 will own most of the files in the web site, while the
    webrun3 will be the user who runs the Apache server and the tomcat.
    It will own log files and other files which the apache/tomcat/ needs
    to write.  In $APACHE_HOME/conf/httpd.conf I did:
       User webrun3
       Group webrun3
    Final version of httpd.conf is given here.
    Also chown_ed to webrun3 the log directories:
      chown -R webrun3 $APACHE_HOME/logs
      chgrp -R webrun3 $APACHE_HOME/logs
    And for tomcat:
      chown -R webrun3 $TOMCAT_HOME/conf
      chgrp -R webrun3 $TOMCAT_HOME/conf
      chown -R webrun3 $TOMCAT_HOME/logs
      chgrp -R webrun3 $TOMCAT_HOME/logs
      chown -R webrun3 $TOMCAT_HOME/work
      chgrp -R webrun3 $TOMCAT_HOME/work

35) In $APACHE_HOME/bin
    cp apachectl apache-tomcat
    and edited apache-tomcat to have a script to start/stop
    I had to set inside the: 
       export WAS_BORN_BY_APACHE
    or I would get the output at Apache start-up
       jk_post_config NULL
    while you should get
       jk_post_config true
    Why I need to do this, I have no idea... The tomcat is started before
    Apache in my case. But the mistery, I am sure, will be someday explained.


    chmoded apache-tomcat to be executable :
       chmod 755 $APACHE_HOME/bin/apache-tomcat

36) Started the apache/tomcat as:
       $APACHE_HOME/bin/apache-tomcat startssl

    and checked if and worked. 
    They did, so I killed the server with:
	$APACHE_HOME/bin/apache-tomcat stop

37) changed permissions/ownership on the example directories
    cd $TOMCAT_HOME/webapps
    chown -R webinst3 .
    chgrp -R webinst3 .
    cd $TOMCAT_HOME/logs
    chown -R  webrun3 .

38) After all these changes, the ports should be the following:

                    Orig       New     Files affected
    http(apache) --> 80   -->  5180    conf/httpd.conf

    https        --> 443  -->  5143    conf/httpd.conf

    http(tomcat) --> 8080 --> 5080     tomcat/conf/server.xml
                 --> 8009 --> 5007     tomcat/conf/
                 --> 8007 --> 5006     tomcat/conf/

39) The final server.xml, mod_jk.conf, and workers_properties, where
    the ajp13 is used to serve JSP/servlets to apache are given here:
    and corresponding mod_jk and workers_properties files looked
    Note that ajp12 protocol has to be present even if it is not attached
    to any context. This is because it is used to shutdown Tomcat.

    However, after using the mod_jk with ajp13 I got stuck on the
    authentication when SSL is used on Apache (https:). I had to revert
    to ajp12, since mod_jk/ajp13 was messing the headers reported to Tomcat.
    The files with the ajp12 as a connector protocol for serving JSP/Tomcat
    are given belo
    and corresponding mod_jk and workers_properties files looked

40) Since starting/stopping apache+tomcat in this environment requires
    one to be a root, I created C. wrappers to start and stop the whole zoo.

   and compiled it with
     gcc -o apache_start apache_start.c
   as a root, and then added suid permissions to the resulting
   apache_start executable file as:
     chmod ug+s apache_start

   I did exactly the same with apache_stop.c
      gcc -o apache_stop apache_stop.c  
      chmod ug+s apache_stop   

   Now, people do not have to have root access to start/stop Web Server/Tomcat

   I also added a C program killme.c which kills the processes which are
   running by user webrun3. It is indentded to be used after "apache_stop"
   to kill some runaway processes started by apache, Tomcat, or JServ.
   After compiling the program:
      gcc -o killme killme.c
   changed its user and group ownership to webrun3 and added
   SETUID permission bits
      chown webrun3 killme
      chgrp webrun3 killme
      chmod ug+s killme
   To learn which processes need to be killed, the user does
       ps -ef | grep webrun3 | grep -v grep
   (I actually saved this line as a shell script "killwhich" so they can
   just type: killwhich).
   and the user can kill the processes listed by previous command as:
       killme pid1 pid2 ....
   where pidn is the process id number in the second column.

41) Since some of the work we do will involve CORBA, and we use the
    ORBacus from Object Oriented Concepts (
    I created /usr/local/orbacus-3.3.1, created there subdirectories:
    JOB, JTC, OB, and jidl, and downloaded LICENSES/READMES and tar balls
    from JOB-3.3.1*, JTC-1.0.10*, OB-3.3.1*,
    jidl-3.3.1-solaris.tar.gz  and diligently unpacked them.
    a) cd /usr/local/orbacus-3.3.1/jidl
       tar zxvf jidl-3.3.1-solaris.tar.gz
       then made links:
        cd /usr/local/bin
        ln -s ../orbacus-3.3.1/jidl/idlcpp idlcpp
        ln -s ../orbacus-3.3.1/jidl/iordump iordump
        ln -s ../orbacus-3.3.1/jidl/irdel irdel    
        ln -s ../orbacus-3.3.1/jidl/irfeed irfeed
        ln -s ../orbacus-3.3.1/jidl/irserv irserv
        ln -s ../orbacus-3.3.1/jidl/jidl jidl    
    b) cd /usr/local/orbacus-3.3.1/JOB
       tar zxvf JOB-3.3.1.jars.tar.gz
       which produced:
       which will be later added to CLASSPATH
    I copied *jar to $TOMCAT_HOME/lib       
    At this moment, other files were not needed. 

42) I installed the old version of XML4J (xml4j_2_0_15) from IBM, since
    we have some older servlets to port. The IBM site
    distributes only the newest stuff, and I know of no way to retrieve
    the older thing. But I had the old tar in my old instalation. So I did:
       mkdir /usr/local/xml4j
       cp .../xml4j_2_0_15.tar.gz .
       tar zxvf xml4j_2_0_15.tar.gz
    I linked doc directories to the Web tree
       cd $APACHE_HOME/htdocs
       ln -s /usr/local/xml4j/xml4j_2_0_15/apiDocs xml4j-apiDocs
       ln -s /usr/local/xml4j/xml4j_2_0_15/docs xml4j-docs 
       ln -s /usr/local/xml4j/xml4j_2_0_15/TXapiDocs TXapiDocs 
    Doug Dale-Johnson, found the XML4J_2_0_15 at this site:
    Catch it while you can...

43) Installed Xalan-J:
    Created directory and unpacked tar, and made links
      mkdir /usr/local/Xalan-J
      cd /usr/local/Xalan-J
    Unfortunately this tar.gz is strangely packed (does not have top
    directory as version) so you need to create directory first:
      mkdir xalan-j_1_2_D02
      cd xalan-j_1_2_D02 
      gtar zxvf ../xalan-j_1_2_D02.tar.gz
    I made the docs available by creating the link below:
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/Xalan-J/xalan_j_1_2_D02/docs  xalan-docs 

44) Installed Xerces-J version 1.1.3 (the one in synch with Xalan above)
      mkdir /usr/local/Xerces-J
      cd /usr/local/Xerces-J
      tar zxvf Xerces-J-bin.1.1.3.tar.gz
    I made the docs available on the Web by: 
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/Xerces-J/xerces-1_1_3/docs xerces-docs 

45) Installed JCE 1.2.1 Java Cryptography Extension 1.2.1 
    Go to:
    Click on: Download JCE 1.2.1 Software 
    This will get you:
      mkdir /usr/local/JCE
      cd /usr/local/JCE
      cp ..../ .
    and linked the docs to the Web Root.
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/JCE/jce1.2.1/doc jce-docs
    Then added the security provider to Java:
      a) copied JCE jars to lib/ext
         cp /usr/local/JCE/jce1.2.1/lib/*.jar /usr/local/jdk1.3/jre/lib/ext
      b) edited /usr/local/jdk1.3/jre/lib/security/ and added

46) I also installed Cocoon from, but I am exploring
    the matter further, since supposedly (but I am not sure at this time)
    cocoon uses the older versions of xerces which is
    not compatible with the latest one (the one  which I installed).
      mkdir /usr/local/Cocoon
      cd /usr/local/Cocoon
      gtar zxvf Cocoon-1.8.tar.gz
    and linked the docs to the Web Root.
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/Cocoon/cocoon-1.8/docs cocoon-docs 
47) Installed JSSE (JavaTM Secure Socket Extension (JSSE) 1.0.1)
    available from
      mkdir /usr/local/jsse
    with a netscape browser go to:
    Click on domestic distribution
    Logged in, accepted, continue, answerer Yes, Continue, 
      cd /usr/local/jsse
      cp ..../ .
      cd jsse1.0.2
      cd doc
      cp -p ../*.html .
    and linked the docs to the Web Root.
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/jsse/jsse1.0.2/doc jsse-docs 
    I installed the JSSE as "installed extension" for jdk1.3 and
    copied them to /usr/local/jdk1.3/jre/lib/ext directory
      cp -p /usr/local/jsse/jsse1.0.2/lib/*jar $JAVA_HOME/jre/lib/ext
    I then registered the provider in $JAVA_HOME/jre/lib/security/
    by adding a line:
    I already had 3 providers registered.

48) Installed JAF JavaBeansTM Activation Framework  
    Click on download, continue, accept, FTP download
       mkdir /usr/local/jaf
       cd /usr/local/jaf
       cp .../ .
    and linked the docs to the Web Root.
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/jaf/jaf-1.0.1/doc jaf-docs

49) Installed JavaMail 1.1.3 release:
    With your browser go to:
    Click on continue, accept, get = 1,960,787 bytes. 
       mkdir /usr/local/JavaMail
       cd /usr/local/JavaMail
       cp .../ .
    and linked the docs to the Web Root.
      cd $APACHE_HOME/htdocs
      ln -s /usr/local/JavaMail/javamail-1.1.3/docs JavaMail-docs

50) Installed jdom beta 5 release from
      mkdir /usr/local/JDOM
      cd /usr/local/JDOM
      I also have my own copy:
      Then I built it:
        cd /usr/local/JDOM
        ./ compile
        ./ samples
        ./ javadoc
      and linked the docs to the Web Root.
        cd $APACHE_HOME/htdocs
        ln -s /usr/local/JDOM/jdom-b5/build/apidocs jdom-docs

51) I copied the jars to the Tomcat lib directory
      cd $TOMCAT_HOME/lib
      cp /usr/local/orbacus-3.3.1/JOB/*jar .
      cp /usr/local/jaf/jaf-1.0.1/activation.jar .
      cp $ANT_HOME/lib/ant.jar .
      cp /usr/local/Xalan-J/xalan-j_1_2_D02/bsf.jar .
      cp /usr/local/Xalan-J/xalan-j_1_2_D02/bsfengines.jar .
      cp /usr/local/jaxp1.0.1/jaxp.jar .
      cp /usr/local/jaxp1.0.1/parser.jar .
      cp /usr/local/JDOM/jdom-b5/build/jdom.jar .
      cp /usr/local/jsse/jsse1.0.2/lib/*.jar .
      cp /usr/local/JavaMail/javamail-1.1.3/mail.jar .
      cp /usr/local/Xalan-J/xalan-j_1_2_D02/xalan.jar .
      cp /usr/local/Xerces-J/xerces-1_1_3/xerces.jar .
      cp /usr/local/xml4j/xml4j_2_0_15/xml4j.jar .

    and then chowned the diretories under $TOMCAT_HOME to webinst3 or webrun3

      cd $TOMCAT_HOME
      chown -R webinst3 bin classes doc lib src webapps
      chgrp -R webinst3 bin classes doc lib src webapps
      chown -R webrun3 logs work
      chgrp -R webrun3 logs work

51) Basic environment for working with Java on webinst3 account.
    Since the assumption is that all content for this Apache server
    is owned by user webinst3, beside some files which
    are owned by webrun3 (a user/group which runs Web server and 
    servlet containers).

    The webinst3 runs /bin/tcsh as default shell. The .cshrc file
    in the HOME directory is:


    I provided short scripts which allow users to switch from
    java1.1 (for applets) to 1.2(latest production release)
    to 1.3(lastest beta) 

    and have put the following aliases into .cshrc

alias jdk1.1 'source /home/webinst3/bin/cjdk1.1'
alias jdk1.2 'source /home/webinst3/bin/cjdk1.2'
alias jdk1.3 'source /home/webinst3/bin/cjdk1.3'

    e.g., typing:
    when you are logged in as webinst3 with set your environment
    to the Java 1.1 needed for applets compilation, and you can get
    back to Java 1.3 by typing
    And if you have problems with JDK1.3, you can always try the J2SE
    by typing

52) I also created the basic running environment for user webrun3.
    The webrun3 is running ksh and is not expected to be used often,
    though, during development, it may be used occassionally.
    The webrun3 user (see point 34 above) is the id which
    Apache/Tomcat are using to run. I created the .profile file:
    and also the kjdk1.x which allow you to switch the release of JDK..

53) Created a "cs" script to compile servlets and placed it
    in /home/webinst3/bin directory. The script is:

    To run it, you should cd to the directory where you have your servlet
    source, and then execute: 
    You can also add more options to the the java compiler (javac) but you
    need to enclose it in quotes. For example, to have more output you can do:
       cs "-verbose"

54) I created a skeleton of the web application called SciPortal
    and mounted it as SciPortal under Apache DocumentRoot. My $APACHE_HOME
    is /usr/local/apache_1.3.14. I created directory SciPortal under 
        cd $APACHE_HOME/htdocs
        mkdir SciPortal
        cd SciPortal
        mkdir WEB-INF
        mkdir WEB-INF/classes
        mkdir WEB-INF/lib

55) For doc directories which came with commercial software, and 
    which are linked in the $APACHE_HOME/htdocs
    I placed the .htaccess file. The docs may have some copyright
    restrictions and I am too lazy to read the small print..


56) I edited the,, and script
    in $TOMCAT_HOME/bin
    to set the proper environment for tomcat, independed of 
    the user environment which starts them. 
    The edited versions are found at:

Modified: Fri Nov 10 08:28:16 2000 GMT
Page accessed 20409 times since Sat Oct 14 06:11:00 2000 GMT