Ex No 4
Ex No 4
4
CONFIGURING AND INSTALLING APACHE TOMCAT SERVER
Aim:
Introduction:
Apache Tomcat server is an open source Java-capable HTTP server and servlet
container developed by Apache Software Foundation(ASF).
This could execute special Java programs known as Java Servlet and Java Server
Pages (JSP). The sites for Tomcat are http://tomcat.apache.org or http://www.apache.org .
Tomcat was originally written by James Duncan Davison , based on an earlier Sun's
server called Java Web Server (JWS). Tomcat is an HTTP application runs over TCP/IP. In
other words, the Tomcat server runs on a specific TCP port in a specific IP address. The
default TCP port number for HTTP protocol is 80, which is used for the production HTTP
server. For test HTTP server, any unused port number between 1024 and 65535 can be
chosen.
Procedure for Installing Apache Tomcat Server:
The basic environment required for installing Apache Tomcat Server is given below:
• JDK
• Apache Tomcat 10.x
• Windows OS
Step 1: Downloading Apache Tomcat
Download the Apache Tomcat Server from http://tomcat.apache.org/download-
10.cgi.
Figure Tomcat for various OS
Step 5: Unzip Tomcat 10 Zip File. Go to the location where you have downloaded the Tomcat
10 zip file. Right-click on the apache tomcat file place the cursor on 7-Zip and click on Extract
Here to extract the folder.
Step 6: Creating JAVA_HOME Variable. Click Start then in the search bar, search for “Edit
the system environment variables” and click on it. The following System Properties box will
open. Select Environment Variables in the box.
On clicking Environment Variables the following box will open.
Step 7: We have to create a JAVA_HOME variable and insert the path of the JDK file stored in
our computer, which will be shown below. So select New from the System variables in the
above picture. A New System Variable box will be opened where we will have to fill in the
Variable name and Variable value.
Step 8: Go to the location where you have stored the contents of the JDK file in My Computer
or PC. Copy the root path of the location of the JDK file as shown below.
Step 9: Paste the JDK path from the above picture into the Variable value field and in the
Variable name field, give the name JAVA_HOME as shown below.
Step 10: Check the Working of Tomcat.
Open the extracted apache tomcat file. We will see all the following files in them.
Among them open the batch file named “startup”.
Step 11: Check if the Startup Windows Batch File is running properly.
By default, the server port number is 8080.
Step 12: Successful Installation of Tomcat.
Our next step is to open an internet browser like Google and type in the address
http://localhost:8080
Then click enter and the following browser will appear suggesting the successful installation of
Apache Tomcat.
Result:
Thus the installation of Apache Tomcat web server was completed successfully.