How to configure Tomcat 6 in Eclipse
Steps for configuring Tomcat 6 in Eclipse
- Download Eclipse and extract it into a folder. (I have downloaded Eclipse-Galileo [Eclipse IDE for Java EE developers] from http://www.eclipse.org/downloads/ and extracted in into D:\Eclipse )
- Open eclispe by double clicking eclipse.exe
- In windows->Preferences->server -> run time environment
- Click add, select the Tomcat v6, click Next
- Set the Tomcat installation directory (for me it is D:\apache-tomcat-6.0.20)
- Set the JRE by clicking Installed JREs -> Add -> Standard VM -> set the JRE home to JDK folder (path in step 3)
- Select the newly added JRE and click Ok
- Select the newly added JRE from the drop down of JRE and click Finish
- At the top right corner of eclipse there is a button 'Open perspective'. Select Java EE perspective.
- If you can't see 'Server' tab at the bottom, select Windows->show view -> server
- In the server tab at the bottom, Right click -> New Server -> Select the Tomcat v6 and click Finish
- If you want to run the tomcat manually from command prompt then set the environment variable JAVA_HOME to jdk path ie the path in step 3