How to Install Apache Tomcat

7:15 PM / Comments (14) / by Kevin Vu

PART 01: INSTALLING APACHE TOMCAT 6.0.18
1/ Go to Tomcat Download site: http://tomcat.apache.org/download-60.cgi
2/ Look for 6.0.18->Binary Distributions->Core. Download and save the zip file (apache-tomcat-6.0.18.zip) to C:\ drive
3/ Extract the zip file to have C:\apache-tomcat-6.0.18\
4/ Rename folder “apache-tomcat-6.0.18” to “Apache
5/ Copy the following JAR files from apache lib folder (C:\Apache\lib\) to JDK's jre\lib\ext\ folder(C:\Program Files\Java\jdk1.6.0_11\jre\lib\ext\)
servlet-api.jar
jsp-api.jar
el-api.jar
tomcat-dhcp.jar

Note: Those 4 files above contains Java classes that need to be available to the JDK and JRE when you develop servlets and JSPs.

PART 02: SETTING JAVA_HOME ENVIRONMENT VARIABLE
1/ Browse to C:\Apache\bin\. Right click on “catalina.bat” and choose Edit
2/ Look for the following lines:
rem $Id: catalina.bat 656834 2008-05-15 21:04:04Z markt $
rem ---------------------------------------------------------------------------

rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%

3/ Add this line: set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11\ in between like below:
rem $Id: catalina.bat 656834 2008-05-15 21:04:04Z markt $
rem ---------------------------------------------------------------------------
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11\
rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%

4/ Save and close catalina.bat file.

PART 03: STARTING TOMCAT
1/ Open the command prompt (Start->Run->Type in cmd->click OK)
2/ Use DOS command (cd \Apache\bin) to navigate to C:\Apache\bin
3/ Type “startup” and hit enter. Tomcat will start and a Tomcat window will appear.

PART 04: STOPPING TOMCAT
Close the Tomcat window or type “shutdow” (C:\Apache\bin\shutdown) and hit enter at the DOS command prompt.

PART 05: TESTING TOMCAT
1/ Start Tomcat.
2/ Open your web browser.
3/ You can test the following addresses with your web browser:
http://localhost:8080/
http://localhost:8080/examples/servlets/
http://localhost:8080/examples/jsp/

14 comments:

Anonymous @ May 28, 2009 at 8:52 AM

This is exactly the information I was looking for installing Tomcat 6. It is clearly illustrated and very easy to follow. Thank you!

Anonymous @ August 1, 2009 at 12:25 AM

Thank you very much

judy @ August 13, 2009 at 1:26 PM

PART 02: SETTING JAVA_HOME ENVIRONMENT VARIABLE
1/ Browse to C:\Apache\bin\. Right click on “catalina.bat” and choose Edit

i cannot see edit when i right click whats the problem....

Kevin Vu @ August 14, 2009 at 10:08 AM

hello Judy,

you can just run notepad->Select "File" menu->Select "Open" and browse to C:\Apache\bin to open catalina.bat file

note: in the "Open" window, at the bottom, make sure you select "all files" in "Files of types" dropdown list to be able to see *.bat files.

Deepak Arora @ September 1, 2009 at 2:46 AM

I have installed just installed Oracle 9i. And this is what the error I am getting while running Apache:

Oracle Servlet Engine

Welcome to the Oracle Servlet Engine or OSE for short. This is the installed administration web domain. This domain allows you to view and adminster the namespace of the Oracle 8.i instance.

Please Reply me to deepakarora01@gmail.com

Deepak Arora @ September 1, 2009 at 2:46 AM
This comment has been removed by the author.
gowri @ August 8, 2011 at 12:50 PM

hi i finish installed i did all the step but while testing tomcat its home page is not displaying

Beta @ December 2, 2011 at 10:04 AM

I have just installed Apacahe Tomcat, thank you guidance on this install.

Anonymous @ January 22, 2013 at 12:52 PM

Hai guys i think here you will find solution for apache tomcat Install

http://creativetuts.blogspot.in/2013/01/how-to-add-jar-files-into-eclipse-build.html

Unknown @ August 21, 2013 at 2:58 AM

Awesome !!!!! This was the thing I was searching and found it exactly

Thanks a lot

Anonymous @ September 10, 2013 at 2:18 PM

CATALINA_HOME variable not defined error msg is there.please reply asap

Anonymous @ November 24, 2013 at 9:48 PM

Thnx a lot.. finally it worked..

Anonymous @ February 9, 2014 at 10:38 AM

When i start tomcat server through startup command, a window appears and some exception is thrown out..

Pls help me in solving this problem

lucidtechsystems @ October 8, 2016 at 5:01 AM

Thank you detailed guide to install apache tomcat.
Regards,
Apache Tomcat.