导入Tomcat的源代码,其实很简单,可是如果没有找到正确的方法,你会浪费大量的时间,我就是浪费了好多时间在配置编译环境上。最正确的办法是到Tomcat的官方网址去找到答案。
可以参考下边的连接,这个是关于Tomcat7的。
http://tomcat.apache.org/tomcat-7.0-doc/building.html
1. 设置环境
2. Check out the latest tomcat source code
上边的命令SVN会把最新的Tomcat7011的源码下载到你的硬盘D:\Tomcat7\ 下
SVN 下载地址 http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
3. 为Eclipse编译工程
4. 设置Eclipse 环境 (Class-path Variables)
TOMCAT_LIBS_BASE 要指向 ${base.path}
5. 导入工程
6. 编译问题
往往我们在这时会遇到一些编译错误,这是因为我们Eclipse中JRE环境设置的不正确,需要调整
7. 最周到的服务