Monday 20 August 2012

How to Configure Tomcat in the system


Requirements:
Download zip version of tomcat(apache-tomcat-6.0.16) from apache tomcat website.
Download jdk-6u2-windows-i586-p.exe from sun website.
Here in this tutorial I am using apache-tomcat-6.0.16 and jdk1.6 update2. You can even use .exe version of apache-tomcat-6.0.16 and other version of jdk(but for apache-tomcat-6.0.14 theminimum requirement is jdk 1.5).

First you need to set path for java.

Right click My Computer and click properties. You will be getting System Properties window. In that click Advanced->Environment variables. In User variables for “yoursystemname”. Click New
In Variable name and in Variable value type as follows.
(In my case I have installed java and tomcat in c colon. In your case it might be in different colon. So change it accordingly. You might have installed jdk 1.5 then in that case navigate toC:\Program Files\Java\jdk1.5\bin and copy the things what you are getting in address bar.
Variable name:  JAVA_HOME
Variable value:  C:\Program Files\Java\jdk1.6.0_11

Variable name:  PATH
Variable value:  %PATH%;%JAVA_HOME%\bin;C:\apache-tomcat-6.0.18\bin

Variable name:  BASEDIR
Variable value:  C:\apache-tomcat-6.0.18

Variable name:  CATALINA_HOME
Variable value:  C:\apache-tomcat-6.0.18

Variable name:  CLASSPATH
Variable value:  .;D:\apache-tomcat-6.0.18\lib\servlet-api.jar;

(In some versions of tomcat the lib folder will be inside commons folder in that case it will be
Variable value: .;C:\jakarta-tomcat-5.5.9\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar)
The first entry of CLASSPATH must be a (.) period, which denotes the current directory. 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...