Start Tomcat source code debugging

Source: Internet
Author: User

Start Tomcat source code debugging

 

For work reasons, You Need To Know How Tomcat's entire architecture is designed. Just as you want to use spring MVC for web development, You Need To Know How spring is designed and what main classes are there, what are they used.

 

Here are two methods to debug the Tomcat source code:

Method 1:

1) configure the tomcat installation package to eclipse

2) add source code to the jar package related to Tomcat

3) start Tomcat in debug mode

This method is the easiest.

 

I used another method during debugging:

Method 2:

1. Download the tomcat installation package and source code package

Http://tomcat.apache.org

This is the official Tomcat website. You can find the corresponding downloads here.

Download and decompress the package.

 

2. Open eclipse and create a Java project. (Not a web project ).

The project name I created is apachetomcat.

 

3.Source code packageCopy the source code in the Java directory to the src directory in your Java project.

 

 

4. Copy the following directory in the installation package to the project root directory:

 

Ignore errors. These directories are in the same directory as SRC.

 

5. Start debugging

Find org. Apache. Catalina. startup. Bootstrap. Java in the src directory.

 

 

 

Next, you can use eclipse for Tomcat debugging.

 

6. Tomcat startup information

 

 

After the startup, enter http: // localhost: 8080 in the browser to view the Tomcat management interface:

 

 

Start your debugging journey.

 

Start Tomcat source code debugging

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.