title: How to add tomcat's lib in ant build's classpath?
body: <ul>
  <li>I needed servlet-api.jar and jsp-api.jar in my eclipse dynamic web
  project. 
  <ul>
  <li>So I went to Project -> Properties -> Targeted Runtimes -> Checked Apache Tomcat 6.0. </li>
  <li>Now I try to build a war file using Ant as I have to deploy the war file on a unix machine.</li>
  <li><strong>Problem -</strong> Ant build fails (package javax.servlet does not exist, etc etc) because the jar files are not under /WEB-INF/lib/. How do I include these jar files in the classpath ? I can't hardcode it as the path is different in windows(D:\Program Files\Apache...) and unix(/usr/local/apache..).</li>
  <li>Current classpath-</li>
  </ul></li>
  </ul>
  
  <blockquote>
  <pre><code>&lt;path id="compile.classpath"&gt;
      &lt;fileset dir="${web.home}/WEB-INF/lib"&gt;
          &lt;include name="*.jar"/&gt;
      &lt;/fileset&gt;
  &lt;/path&gt;
  </code></pre>
  </blockquote>
  
  <p>p.s. <strong>My Apache-Tomcat versions are different on windows(6.0.32) and unix(6.0.36)</strong></p>