• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Step-by-step Installing Tomcat4 in Windows NT/2000 Server

 
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And pals, two more notes!
Addtion-1
In Win98 DOS may (in fact, should) object on low available memory and so click on a DOS window's top-left-->Properties-->Memory--->And set the defaul memory from Auto to 4096!
Addition-2
If in Win NT/2000 server check your Internet Explorer Window's Tools--->Internet Options--->Connections--->Lan Settings whther you are using any proxy(only which machines are working under a network like in my office) and check mark the box on bypass proxy for local address. Otherwise your computer will use proxy server to find out the paths and will fail!

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to mention that Win2000/NT4 do not require a restart when you set environment variables such as PATH, CLASSPATH or TOMCAT/CATALINA_HOME. Every new DOS window obtains the environment variables from the system, so no restarts are needed.

Also, the trailing semicolon is not necessary and I've seen it cause problems. Also, %PATH% should not be typed in, this is somewhat recursive without the DOS 'set' command, which is not really present in the Property Sheet for WinNT/2000.

Note for IDE users: Step-1 (ii) should not be done if you use an IDE.
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thnx Mike! I just installed Tomcat in 10 machines thru my students yesterday and found that NT/2000 does not require restarting and semi-colons are problematic here!
------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another point to note pals, if u wanna compile servlets fine!

Addition-3 : You also have to include servlet.jar file in your classpath

If you dont want to see compiler errors despite tomcat 4 running nicely, you have to set your classpath like this ---
varaible: classpath, value: c:\jdk1.4\lib;c:\jdk1.4\lib\tools.jar;c:\jdk1.4\lib\servlet.jar
And frnds, just use spaces and semi-colons where necessary only, use lowercases....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do I understand then that you are not running IIS in this setup?
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi liz, IIS5 comes with Windows 2000 server and its running automatically when you started the server, no problem. But IIS is running on port 80 and Tomcat is running on port 8080 --- so there will be no conflict between these two to run simultaneously....
------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
L. Riley
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...but won't users have to type 8080 to get to jsp applications?
If I change tomcat's port to 80, then IIS won't be doing much of anything...true? (maybe that wouldn't be all bad)
On the previous version of tomcat, I used the ISAPI re-director. The way I understood that was whenever IIS saw something with a jsp extension, it tossed it over to tomcat.
There doesn't seem to be an ISAPI for the most recent version of tomcat...
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, users have to type 8080.

Here is a link that seems to answer your question about Tomcat 4.x and IIS integration. No guarantees of 'workability', I haven't tried it.
http://www.vacodi.com/howto/tomcat/iisnt/index.html
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Liz, if u change Tomcat's port number to 80 then at first there will be no problem. But as IIS is also running on port 80, if u try to start tomcat the O/S will tell you that the port tomcat is trying to acquire is already alotted to another application. So Tomcat will not run. But if u manually stop the IIS service from Administrative tools, then u can start tomcat at port 80....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ashik uzzaman!!!
I have a problem with the Tomcat, I install tomcat 4.0 and I can start Tomcat but when I am going to the http://localhost:8080/ I can't open the browser, it give me error with this message (HTTP 500 internal Server Error). in the IE. browser
thanks
Bashir
[This message has been edited by Bashir Mirzad (edited December 08, 2001).]
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bashir, i need some more info on ur part. But i have understood this typical problem as i faced it several times earlier.
You have successfully started Tomcat 4.0.1 (not beta, i hope) and saw the DOS-Window title "Catalina". That means tomcat is running. Now which O/S u r using? If Windows NT/2000 server u should check my Addition-2 above for bypassing the proxy server, specially if ur machine is under a network. Another thing is try http://127.0.0.1:8080/ to get the tomcat home page and thus to test whether ur hosts file has been wrongly edited or not....
Lemme knwo whether it worked or not.

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Bashir Mirzad
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Salaam (Hi) Ashikuzzaman,
Thanks for your reply I am using windows XP Professional its all most like win2000 Prof.
And my machine is not under any network, but I am using Internet from cable its like LAN
At the first time I can�t start tomcat because the services in the Control Panel/ Administrative Tools and Tomcat Service properties startup tab by default its start automatically I change that to Manual, now I can start Tomcat successfully I don�t get any error message in the tomcat window, but when I am going to the IE browser and typing the http://localhost:8080/ I cannot see the page it give me error. And plz tell me what do you mean be http://127.0.0.1:8080/ ???
I am sorry my English is not good I can't explain it better; I hope you know what I mean,

Whish you all the best
Bashir Ahmad
 
Ashik Uzzaman
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oalaikum Assalam Bashir Shaheb!
I haven't used Windows XP yet and wanna know more abt ur configurations. U better stop ur Tomcat from XP and start it from a DOS session. There may be some XP specific jobs to be done i don't know. Where did u install JDK?

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.HOW TO INTEGRATE TOMCAT WITH APACHE?
2. HOW/WHERE TO STORE JAVA BEANS IN TOMCAT?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm closing this thread.

You've already started a single thread for each of your questions in this thread.
[ January 09, 2002: Message edited by: Mike Curwen ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic