Basic Guide To Install Tomcat In Windows
- Check if JDK/JRE is installed in your PC. If it is not yet installed it, please find it in the below URL
After you click on the download button you will choose the downloadable compatible to your OS.
Please check your Windows system type to select the appropriate exe. To view your system type press Windows button + R which opens the Run prompt. Type msinfo32 to view your System Information.
You will either need a JRE_HOME or JAVA_HOME to run the tomcat server.
- Install Apache Tomcat. The downloadable will be available in the below URL
Since you now know the system type go ahead and select the appropriate downloadable.
For example, If your system type is 64 bit - choose 64-bit Windows zip
- Create a folder named 'Tomcat' in Local Disk C: and extract all the files from the downloaded 'apache-tomcat-{version}-windows-x{bit}.zip folder to this path C:\Tomcat
- Setting CATALINA_HOME system variable.
This step is very important. Right click on This PC -> Properties -> advanced system settings -> environment variables
CATALINA_HOME should be set to the path of the bin folder in Tomcat. Note do not include bin in the path. We need the path to the bin not the bat files inside bin.
- Create a setenv.bat file in C:\Tomcat\bin.
Open Notepad and set the JRE_HOME and JAVA_HOME path :
For example:
set "JRE_HOME=C:\Program Files\Java\jre1.8.0_40"
set "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_40"
- Start Tomcat in Windows command prompt:
%CATALINA_HOME%\bin\startup.bat
The command prompt will display 'Server startup in xxxx ms'
You can also verify this in the browser - enter http://localhost:8080 and you must see Apache Tomcat Page
This is about it!! You must be up and running!!