Today i am going to discuss how to install Apache Tomcat server in the windows platform. i think this post will be helpful to most of the people ho are new to java(specially J2EE) developments. i decided to compose this article because the most of my friends were confusing and messing the things up when installing and configuring the Apache tomcat server. I will be installing Apache tomcat 7 in my PC.
prerequisite for Apache Tomcat 7:
JDK 1.6 or higher version
you can download the Apache tomcat 7 or latest through the Apache Software Foundation official website for Tomcat server. i have downloaded the binary distribution version for the installation.
then follow the installation instructions as below.
1. extract the ZIP file and copy the extracted apache-tomcat-7.0.23 directory to the C:\Program Files
2. then create the following environmental variables.
JAVA_HOME(the value should refers the java installation directory e.g:- C:\Program Files\Java\jdk1.6.0)
CATALINA_HOME(the value should refers the Apache tomcat extracted directory e.g:- C:\Program Files\apache-tomcat-7.0.23)
3. now the tomcat server is installed and you can run and test the server as follows.
run the startup.bat file that is inside the bin directory of the tomcat server using the windows command prompt(cmd). then it will startup and run the server.
4. browse http://localhost:8080 url and you will be able to see apache server is running.
(Note: by default, the apache tomcat server is running on port 8080. if you need to change the port it can be done by changing the server port declaration done in the server.xml file located inside the conf directory (conf/server.xml))
Hope this will helpful for you!