|
|
Server-Side SOAP 2. Deploying Tomcat
Steps one to three cover the deployment of the Tomcat Application Server. These instructions
are applicable to both Win32 and UNIX operating systems - take care to follow the instructions
appropriate to your operating system in sections where differences exist.
|
STEP ONE |
Download and install Java |
-
If you already have java version 1.3.0 or later installed on your machine then you can skip this step.
You can verify your java version with the following command:
> java -fullversion
The result of this command should be something like the following (if you see a version number
of 1.3.0 or later then you are OK and can skip to the next bullet point):
java full version "1.3.1_01"
If you have a version prior to 1.3 or if java is not installed at all (i.e. when you typed the
above command, "java" could not be found at all) then you can download Java 1.3 free of charge
from Sun Microsystems. Go to http://java.sun.com/j2se/1.3/, choose the download section relevant to your operating system, in the section entitled "Download Java 2 SDK, v 1.3.x Software..." hit CONTINUE, read and ACCEPT
the agreement (if you are happy with the terms) then choose the appropriate site for FTP download.
Save the file to your machine. This is a self-extracting executable. Run it to install the package.
If you have a version prior to 1.3 and for whatever reason do not want to install 1.3
(even though two Java SDK versions can, in general, be installed in parallel without danger)
then feel free to proceed anyway though we cannot guarantee that the tutorial will work for
you. Some prior versions will work though it is not our intention to test them all and provide
a compatibility list.
- Set your java home environment variable "JAVA_HOME". Set this to the root directory of your JDK
installation (ie. the parent of the bin directory where your java.exe is found). Keep this
command in a script file (call the file anything you like but I'll refer to this as mystartup.bat on
Win32 or mystartup.sh on UNIX). We will be adding more things to it later so as to avoid having to type
the same commands over and over again.
Win32 Systems
If the fully qualified path of your java.exe is C:\jdk1.3.1\bin\java.exe then for the moment the script
looks like this:
| Win32 script : mystartup.bat |
set JAVA_HOME=C:\jdk1.3.1
|
UNIX Systems
If the fully qualified path of your java binary is /usr/java then for the moment the script looks like this:
| UNIX script : mystartup.sh |
#!/bin/sh
JAVA_HOME=/usr/java
export JAVA_HOME
|
|
STEP TWO |
Download and install Tomcat |
-
Create a soap directory on your machine. We will be using C:\soap on Win32 and /home/me/soap on UNIX
but you can name it anything and put it anywhere you like. Just ensure that you replace your chosenpath
and directory name for C:\soap or /home/me/soap (as applicable) wherever you see it below.
|
Warning : White-space in the directory names of any directory in the path will cause you pain later on so this should be avoided from the outset. |
-
Go to
http://jakarta.apache.org/tomcat/index.html and download Tomcat (choose Download/Binaries then Release-Builds/Tomcat-3.2.x (where x is the latest subversion of 3.2)
then choose "jakarta-tomcat-3.2.x.zip" for Win32 or "jakarta-tomcat-3.2.x.tar.gz" for UNIX
and save it to your machine).
|
Warning : When you read 3.2.x in the following text and scripts, do not take it literally - replace the x with the 3.2 subversion number of the package you have
downloaded. |
-
Unpack to the soap directory. Everything will be contained in a subdirectory named jakarta-tomcat-3.2.x.
Ensure that within jakarta-tomcat-3.2.x there is a lib directory and it contains 6 jar files - these are
the jar files that contain the Tomcat classes themselves plus all required libraries.
|
STEP THREE |
Startup Tomcat and verify that it is operating correctly |
You now have the Tomcat application server up and running. The following section teaches you how to deploy the Apache SOAP Webapp to your Tomcat server.
[ Nicholas Quaine ]
Copyright © 2001-2007 Nicholas Quaine. All rights reserved.
|