Hi Ranchers,
There were lots of posts on installation steps of
Tomcat in the past, now in present and will be in future. I use Windows 2000 Server and Tomcat4.0.1 in my home and office both as a web server and a
servlet runner and earlier used to code in JSDK2.1(Tomcat is better to use than JSDK for learning purposes). I faced the same installtion problems like many and suffered weeks...
...so here i m giving the steps involved to install Tomcat4 under Windows NT/2000 Server. Get Ready!
Step-1 : Install JDK1.3/1.4 in your machine. This may invovle combination of some more steps and almost all who have once run a
.java file have already gone thru this step.
(i) You fisrt download JDK1.3/1.4. You can get JDK1.4 beta-3 from
http://java.sun.com/j2se/1.4/ . I use JDK1.4 beta-2 which comes with
servlet.jar file packed in his library.
(ii) Register .java file to your O/S. Go to Your Computer's Explorer's (or any open window's) Tools/Folder Options/File Types/New/ and write the extemsion .java and click OK. In Windows NT Server along with the extension you have to give the MIME TYPE ---> text/plain.
(iii) Set path variable. To set it in Win NT/2k, click on My Computer-->Properties-->Advanced-->Environmental Variables. Click on lower panes New button and give variable:
PATH and value:
C:\JDK1.4\BIN;%PATH%; and restart the machine(plz dont't restart!). To avoid restarting the machine, open a DOS Window and give the following command :
set PATH = C:\JDK1.4\BIN;%PATH%; I f you are using Win98 then give this entry in Autoexec.bat file found in Start-->Run-->sysedit.
Step-2 : Install Tomcat 4 in your machine. (i) Download Tomcat 4.0.1 binary from
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/ .
(ii) Unzip or install Tomcat in any drive. I installed it in C:\Tomcat4\Tomcat which contains all the bin,lib,classes,webapps etc directories.
(iii) If you are using JDK1.3 or earlier, copy the servlet.jar file that's found under your Tomcat_Install_Dir\common\lib\servlet.jar to c:\jdk1.3\lib. JDK1.4 does not need this copying.
Step-3 : Set CLASSPATH Variable Set your environmental
CLASSPATH variable in the same way as you did in case of setting
PATH variable. Just the values will be ---> Variable : CLASSPATH and value : C:\JDK1.4\LIB\TOOLS.JAR;C:\JDK1.4\LIB;
Avoid restarting in the previous way!
Step-4 : Set JAVA_HOME Variable Set your environmental
JAVA_HOME variable in the same way as you did in two earlier cases of setting
PATH and
CLASSPATHvariable. Just the values will be ---> Variable : JAVA_HOME and value : C:\JDK1.4; Here remember that only the JDK installation directory is to be set, not the bin or lib directory like c:\jdk1.4\bin. This is a typical mistake!
Step-5 : Set CATALINA_HOME Variable Set your environmental
CATALINA_HOME variable in the same way as you did in three earlier cases. Just the values will be ---> Variable : CATALINA_HOME and value : C:\TOMCAT4\TOMCAT; Here remember that only the TOMCAT installation directory is to be set, not the bin or lib directory or anything else.
Here if someone is using Tomcat 3.2.3 or earlier version he has to set
TOMCAT_HOME instead of CATALINA_HOME.Avoid restarting the machine in the same way only for this session.
That's done! Now
test whether Tomcat has been configured properly. So you have to start Tomcat first. For Testing ---
(i) Start Tomcat. Go To C:\Tomcat4\Tomcat\bin by using DOS command
CD. Then just type
startup and press enter.
You should see a new DOS Window titled Catalina. Tomcat by default uses port#8080 to run its service.
(ii) Open you browser and write in address bar
http://localhost:8080/ and you should see the Welcome page of Tomcat in your browser.
So that's what i tried for you dear pals. And lemme know whether i have made any mistake or missed any steps and also whether you are benefitted. Thanks to all JavaRanchers!!
------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
[This message has been edited by Ashik uzzaman (edited November 25, 2001).]