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 )
- Download Tomcat 6.0(http://tomcat.apache.org/download-60.cgi ->Core->zip) and extract it into a folder. (I have extracted it into D:\apache-tomcat-6.0.20)
- Download JDK 6 (http://java.sun.com/javase/downloads/index.jsp -> JDK 6 Update 16 with Java EE ) and install it into C:\Program files\java\jdk1.6
- Open eclispe by double clicking eclipse.exe
- Create a workspace
- 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)
- Click finish
- 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