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