Easy steps:
First, download ant
(1) Extract to C:\ant
(2) Setting environment variables
Ant_home=c:\ant
Second, download Tomcat6 source code
Official website, or SVN down to the local
Third, eclipse
(1) Eclipse Import Source code
(2) to the second step, properties-->libraries, delete only the JRE is left
(3) Prepare Lib directory
Ant.jar
Commons-collections-3.2.jar
Commons-dbcp-1.2.2.jar
Commons-logging-1.1.1.jar
Commons-pool-1.2.jar
Org.eclipse.jdt.core_3.2.0.v_671.jar
Javaee.jar
Wsdl4j-1.6.1.jar
Create User Libraries, Tomcat_libs point to the jar above
(4) Libraries added to JUnit 4 and tomcat_libs in the TOMCAT6 application
The program was compiled and passed, no errors.
Iv. operation of the program.
(1) Run Configuration settings main class
(2) virtual machine parameter start
-D catalina.home= "compiled directory"
(3) Download the core version of Tomcat6 and overwrite the WebApps directory with the WebApps in the source code directory.
(4) Tomcat will be able to run under Eclipse.
Tomcat6 Source code Debugging brief instructions in eclipse