Apache Struts
S E R V L E T A N D J S P R E V I E W
Note
If you're already using Tomcat, be sure you're using 4.x or (better) 5.0.x, because higher versions
(5.5.x and above) require JSDK 1.5 and versions lower than 4.x require some fiddling to work with Struts.
3.
Unzip the contents of the zip file, ensuring that the Create Folders option is selected.
The directory jakarta-tomcat-5.0.28 should appear.
4.
Locate the directory of your Java SDK installation. This directory is known as the
JAVA_HOME directory.
Note
I'm assuming you have installed the 1.4 JSDK.
5.
Open .\jakarta-tomcat-5.0.28\bin\startup.bat with a text editor such as Notepad
and put in an extra line at the start to set up the JAVA_HOME path. For example, if the
JDK is in C:\jdk1.4.2\, you'd use
JAVA_HOME=C:\jdk1.4.2\
6.
Repeat Step 5 for the shutdown.bat batch file.
Note
If you're using Linux or some *nix OS, the files to amend are
startup.sh and shutdown.sh.
Now test your Tomcat installation:
7.
Double-click on the startup.bat batch file. You should see a DOS screen appear
(see Figure 2-1).
8.
Open the URL http://localhost:8080 with your favorite web browser. You should
see the default Tomcat welcome web page (Figure 2-2).
9.
When you're done, double-click the shutdown.bat batch file to stop Tomcat.