Set Up the JSP Environment
One great thing about learning JavaServer Page
technology is that you don't have to spend a bunch of money on software
applications. In fact, you can develop a complete online help system
using nothing but your preferred HTML editor, a Java Developer Kit
(free), and the Tomcat web server (free). While the Tomcat web server
isn't used in most production environments, it is used in some,
and should more than suffice for your needs in developing JSP-based
documentation. Consult with your company's IT staff to determine
if it will work for serving your company's documentation, when the
time is appropriate.
The following steps assume that you are working
with Microsoft Windows. If you need help adapting these instructions
for Macintosh, UNIX, Linux, or another platform, please email
Step 1. Download and install a Java Developer Kit
If you don't have a JDK installed on your machine,
you will need to download and install one.
To download and install the JDK:
Point your web browser at http://java.sun.com/j2ee/download.html.
From this page, download the latest non-beta
version of the J2EE SDK.
At the time of writing, the version you would
download is 1.3.1. The file size for this particular download
is currently ~17.3MB
Double-click the .exe file you downloaded,
and follow the onscreen prompts to install the software developer
Add the path <JDK
installation directory>\lib\j2ee.jar to your CLASSPATH
setting in your autoexec.bat file.
Add the directory <JDK
installation directory>\bin to your PATH setting
in your autoexec.bat file.
Reboot your machine.
Step 2. Download and install the Tomcat web server:
If you don't have a JSP-capable web server installed
on your machine, you will need to download and install the Tomcat
To download the Tomcat web server:
Point your web browser at http://jakarta.apache.org.
From this page, follow the link to download
Scroll down to the Release Builds section
of the page.
Click the link for the latest release 3 version of Tomcat
(at the time of writing, this is 3.3).
A list of files displays. Click on the link
to the file that ends in .zip, and which has the text jakarta-tomcat-
At the time of writing, the file you would
click is jakarta-tomcat-3.3a.zip.
The file size for this particular file is currently ~4.3MB.
Save the file to the location on your machine
that you save downloaded files.
To install the Tomcat web server:
Maintaining the directory structure of the
.zip file, unzip the contents to a directory that is off of
the root of the drive (that is, that is not a subdirectory of
X:/Program Files), that has no spaces,
dashes, or other non-alphabetic or non-numeric characters in
the directory name, and that is a DOS 8.3 name (if you are running
I unzipped my web server into the directory
Depending on the software you use, you may
get a collection of warnings/errors indicating that access to
the file '' is denied, and that the file might be corrupted.
The best I can figure out is that the .zip file has extra information
in it for other platforms that Windows doesn't use. Don't worry
about the errors; they shouldn't keep the web server from working.
If the errors keep you from extracting the content of the .zip
file, see the Troubleshooting
When you unzip the contents of the .zip file,
a subdirectory will be created within the directory you created.
Copy the contents of that directory into the directory you created.
Essentially, you are collapsing the directory structure by one
level. Show me! (~523KB)
Open your autoexec.bat file.
Add an entry like this:
SET TOMCAT_HOME=<install directory>
where <install directory>
is the directory into which you extracted the contents of the
Make sure that you do not follow the entry
with a concluding slash. Instead of the entry:
make the entry:
Reboot your machine.
Navigate to the <install
Right-click on the startup.bat
file and choose Properties from the pop-up menu.
The startup.bat Properties dialog box
Set the Initial Environment value to
Repeat these steps for the shutdown.bat
Two shortcuts are created in the directory,
called Startup.pif and Shutdown.pif.
Double-click the Startup.pif
A DOS window opens.
The window provides miscellaneous details
about your environment. (Your CLASSPATH values will differ from
those displayed in the above screen.)
After this window displays, another DOS window
opens, and shows the progress of the Tomcat web server startup
process. When the startup process is done, the DOS window will
look like this:
You can close the first DOS window that appeared,
but you must leave the second window active (though, you can
minimize it if you want to).
Test that the web server is working correctly
by pointing a web browser to http://localhost:8080.
You should see a window that looks something
This is a web page that was served from the
web server on your machine.
If you get a Page cannot be displayed
error, check that you performed all of the steps on this page.
If you determine that you have, then check the Tomcat
FAQ for other troubleshooting tips.