Skip to content

jiangkai23/debug-tomcat9

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

启动类Main class:

org.apache.catalina.startup.Bootstrap

启动参数 VM options:

  • -Duser.region=US
  • -Dfile.encoding=UTF-8
  • -Dcatalina.home=/Users/mc/Documents/workspace/tomcat9/apache-tomcat-9.0.36-src/home
  • -Dcatalina.base=/Users/mc/Documents/workspace/tomcat9/apache-tomcat-9.0.36-src/home
  • -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  • -Djava.util.logging.config.file=/Users/mc/Documents/workspace/tomcat9/apache-tomcat-9.0.36-src/home/conf/logging.properties home、base、file参数修改为你自己的路径

JDTCompiler中CompilerOptions.VERSION_9等常量找不到(项目中已修改)

} else if(opt.equals("9") || opt.equals("1.9")) {
    settings.put(CompilerOptions.OPTION_Source,
                 CompilerOptions.VERSION_9);
} else if(opt.equals("10")) {
    settings.put(CompilerOptions.OPTION_Source,
                 CompilerOptions.VERSION_10);
} else if(opt.equals("11")) {
    settings.put(CompilerOptions.OPTION_Source,
                 CompilerOptions.VERSION_11);
} else if(opt.equals("12")) {
    settings.put(CompilerOptions.OPTION_Source,
                 CompilerOptions.VERSION_12);

直接注释代码块即可

访问localhost:8080报错解决方案:(项目中已修改)

ContextConfig类的configureStart()方法中的webConfig();后添加如下代码:

context.addServletContainerInitializer(new JasperInitializer(), null);

断点处注释以// debug-tomcat9 开头

About

debug tomcat source code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published