Tomcat Source Import Eclipse

Source: Internet
Author: User

1. Get the source code

Mode one: from the official website http://tomcat.apache.org/download-70.cgi direct download, the official website provides binary and source code two download method, to study the tomcat source code, select the bottom source Way to download

Method Two: Use SVN to get the source code, first install SVN, then create a new directory TOMCAT7, and then in the directory with SVN execute the following command

SVN Co http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/tomcat_7_0_35/./download Source

2. Import the source code into eclipse

Download the source code, please refer to the Tomcat official website http://tomcat.apache.org/tomcat-7.0-doc/building.html the detailed source code import step, this is the best document.

Tomcat's source code is created and managed using Ant. After you install Ant and then execute Ant ide-eclipse, the command executes successfully and is produced in the TOMCAT7 directory. Project and. Classpath two files, which became Eclipse Engineering. This allows you to import the Tomcat source into eclipse (via general--"exisiting Projects into Workspace choose ant compiled Tomcat source) Tomcat source import eclipse In the future may encounter JDK version or JAR package (JUnit and other jar package) issues (in accordance with the official website import, usually not missing jar package), self-resolved JDK version conflict after the import successful if there is a problem, you can remove the examples folder 3. Start TomcatRun Tomcat: Find the Bootstrap class under Tomcat's startup main class Org.apache.catalina.startup package, right-click "Run as", "Run Configurations", In the arguments window, make the following settings:
Write in program arguments: Start
Write in VM arguments:-dcatalina.home= "F:\project\tomcat\apache-tomcat-6.0.18-src\output\build". As shown in the following:



Then run, you can see that Tomcat started successfully, as shown in:



(5) Stop Tomcat: As in the previous step, write in program arguments: Stop, click Run.  To stop Tomcat. When the Tomcat source code is successfully imported, it is possible to debug the tomcat operation mechanism by debugging step-by-step.

Tomcat Source Import Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.