我下的tomcat7(地址:svn上下载地址),遇到的第一个问题是 运行  ant ide-eclipse  的时候,老出错。原来我的jdk版本是1.7的,用1.6的就没问题了。

2、window——preferences——java__build path——Class-path Variables ,在这里设置两个环境变量

设置Eclipse 环境 (Class-path Variables)
     设置TOMCAT_LIBS_BASE,ANT_HOME
     TOMCAT_LIBS_BASE 要指向  ${base.path}
     ANT_HOME 指向安装ant的目录就好了

3、因为一开始tomcat7编译没通过,我又下了个tomcat8编译,结果创建目录都不行,不知道怎么回事。运行到

<target name="downloadfile-2" unless="exist" depends="testexist">
    <!-- Download the file from the two alternative locations -->
    <mkdir dir="${destdir}" />

的时候,创建目录出错。可是tomcat7里面是一样的。不知道怎么回事。tomcat8至少需要jdk7

参考:http://blog.sina.com.cn/s/blog_76dfb8070100pvr2.html