Home Web-application-server Tomcat How to install and Configure the Tomcat Server
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

How to install and Configure the Tomcat Server

Advertisement
Here we are illustrating the installation process only for Windows.

How to install and Configure the Tomcat Server

     

Here  we are illustrating the installation process only for Windows. Steps involved in installation and configuration process for Tomcat 6.0.10 are illustrated below:

Step 1: Installation of JDK:  Don't forget to install JDK on your system (if  not installed) because any tomcat requires the  Java 1.5 (Java 5) and Java 1.6 (Java 6) and then set the class path (environment variable) of JDK.

Step 2: Setting the class path variable for JDK: Two methods are there to set the classpath.

  1. Set the class path using the following command.

    set PATH="C:\Program Files\Java\jdk1.5.0_08\bin";%PATH%
  2. The other way of setting the class path variable is:

First right click on the My Computer->properties->advance->Environment Variables->path.
Set bin directory path of JDK in the path variable. 

Step 3: Now it's time to shift on to the installation process of  Tomcat 6.0.10. It takes various steps for installing and configuring the Tomcat 6.0.
For Windows, Tomcat comes in two forms :  .zip file and the Windows installer (.exe file). Here we are exploring the installation process by using the .exe file.  The directory C:\apache-tomcat-6.0.10 is the  common installation directory as it is pre-specified C:\ as the top-level directory. First unpack the zipped file and simply execute the .exe file. 

 The above shown screen shot is the first one shown in the installation process. Just click on the Next button to proceed the installation process.

 click  "I Agree"  button to continue the installation process.

 Click next to go with  the default components choosen. 

Choose the location for the Tomcat files as per your convenience. You can also choose the default location.

Now choose the port number on which you want to run the tomcat server. Tomcat uses the port number 8080 as its default value. But  Most of the people change the port number to 80 because in this case the user is not required to specify the port number at request time. But we are using here the default port number as 8080.  Choose the user name and password as per your convenience. We can change the port number even the installation process is over.  For that,  go to the specified location as " Tomcat 6.0 \conf \server.xml ". Within the server.xml file choose "Connector" tag and change the port number. 

e.g While using the port number 8080, give the following request in the address bar as:

Default Port: http//localhost:8080/index.jsp

In case of port number number 80 just type the string illustrated below in the address bar:

New Port: http://localhost/index.jsp

Note that we do no need to specify any port number in the URL.

Now click on the Next button to proceed the installation process.

The installation process shows the above screen as the next window. This window asks for the location of the  installed Java Virtual Machine. Browse the location of the JRE folder and click on the Install button. This will install the Apache tomcat at the specified location.

To get the information about installer click on the "Show details" button.

After completion of  installation process it will display the window like the above one.

On clicking at Finish button, a window like the above one will display a message printed on the window given below.

After successfully installing, a shortcut icon to start the tomcat server appears in the icon tray of the task bar as shown above. Double clicking the icon, displays the window of Apache Manager for Tomcat. It will show the "Startup type" as manual since we have changed the destination folder for tomcat during the installation process. Now we can configure the other options like "Display name" and "Description" .We can also start, stop and restart the service from here.

If  installation process completes successfully then a window as shown below will appear.

Now , set the environment variable for tomcat :

Step 4: Setting the JAVA_HOME Variable: Purpose of setting the environment variable JAVA_HOME is to specify the location of the java run time environment needed to support  the Tomcat else Tomcat server does not run.  This variable contains the path of  JDK installation directory. Note that  it should not contain the path up to bin folder. 

set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_08

Here, we have taken the URI path according to our installation convention 

For Windows XP, Go through the following steps:

Start menu->Control Panel->System->Advanced tab->Environment Variables->New->set the Variable Name as  JAVA_HOME and Variable Value as C:\Program Files\Java\jdk1.6.0 and then click on all the three ok buttons one by one. It will set the JDK path.

For Windows 2000 and NT, follow these steps:

Start->Settings->Control Panel->System->Environment Variable->New->set the Variable Name as JAVA_HOME and Variable Value as  C:\Program Files\Java\jdk1.6.0 and then click on all the three ok button one by one. It will set the JDK path

Now , Start the Tomcat Server :  Start the tomcat server from the bin folder of  Tomcat 6.0 directory by double clicking the " tomcat6.exe "  file. You can also create a shortcut of this .exe file at your desktop.

Stop the Tomcat Server: Stop the server by pressing the "Ctrl + c" keys.

 

     

Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: May 24, 2009

Ask Questions?    Discuss: How to install and Configure the Tomcat Server   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Kinjan Ajudiya
June 9, 2011
Tomcat Installation

Thank you very much,,Using this pots i could start my tomcat....
Rushi Patel
July 18, 2011
Regarding exe file of Tomcat

Respected Sir, I am newbies in this field , i want to know that which file i need to download ? I mean its showing only ZIP files on tomcat's official website. It dosn't have any EXE file. And which package i need to select ? CORE or SOURCE or DEPLOYER???
Rushi Patel
July 18, 2011
Regarding exe file of Tomcat

On the oficial website of apache tomcat which file i need to download i am not getting any exe file in the list of all the files. CORE or DEPLOYER or SOURCE ???? Which file i need to download for Apache tomcat ?
vijay kannoje
October 20, 2011
iit

nothing important yaar
sornagandhi
March 19, 2013
about installation of tomcat server

i got a connection problem.so i need detail explanation plz send it to my mail id which i mention above
nirav darji
February 7, 2012
feedback

Nirav p Darji mca-4th sem thankyou sir ji to help me in servlet programe
jitendra naikane
February 13, 2012
to set the envoronment

i want to set the initially requirement of jsp program which help to run the jsp program like *how to set server(tomcat) *some path setting etc to run the jsp proagram
Harisrinivas Kanduri
April 6, 2012
Thank you..

thank you roseindia.. it is helpful......
kishan kothari
May 24, 2012
Tomcate

i have installed Tomcat but i am not able to starting.Bugs is coming that wingow is support..........
Anilkumar Reddy
June 6, 2012
Thank u

Thanks for your clear instructions
KS PANIRAJU
August 7, 2012
TOM CAT GAME DOWNLOAD

I don't no the method of down load the game of tom cat. please help me the down load the game of tom cat.
saikrishna
December 28, 2012
tomcat start when ever system start

plz tel me the solution
adsf
October 5, 2012
hi

thanks its helpfull...
Akash verma
November 22, 2012
no

Thanks for providing me the correct solution i think this is one of the best site where every problem is solved more quickly from other website .Next time i'ii firstly visit on rose india and then on others thanks a lots rose india
Browning Paul
November 23, 2012
pls solution

windows could not start the apache tomcat on local computer. for more information, review the system log. if this is a non-micro soft service, contact the service vendor, and to service-specific error code 0
Venkatesh
July 10, 2013
Tomcat Server Start Problem

I have done until a shortcut icon to start the tomcat server appears in the icon tray of the task bar. Double clicking the icon, displays the window of Apache Manager for Tomcat. It will show the "Starteup type" as manual and Service Status as "Stopped". when i am clicking on Start button the Service Status not changed to "Started". This problem occured at Versions of Tomcate Server are Tomcat6 and Tomcot7. And also many times i uninstaled the Tomcat Server then i got the same Problem again and again. I had JDk7 and my os is WindowsXP(x86bit).Please help me
pia sachdev
January 25, 2014
advanced java

thank u so much for providing me notes for examinations.......
jhansi
March 25, 2014
apache tomcat setup

how to instal
DMCA.com