title: build.xml javac is complaining about missing classes from javax.servlet.http during compliation
body: <p>I've written a <a href="http://pastebin.com/f8HwPG8z" rel="nofollow noreferrer">build.xml</a> (<em>Updated 8:49 PM</em>) for a netbeans project. And I've found that the tomcat libraries such as <code>serlvet-api.jar</code> are in the directory <code>C:\apache-tomcat-7.0.35\lib</code>. But I'm not sure how I'm meant to connect the <code>target="class_compile"</code> using the <code>fieldset dir</code> to the tomcat directory (without changing the build.xml each time I wish to compile from another computer).</p>
  
  <p>I've read the question <a href="https://stackoverflow.com/questions/7453652/error-while-including-external-jars-in-ant-script">error while including external JARs in ant script</a>, with the solution being a missing <code>classpathref</code> attribute within the <code>javac</code> element (although my <code>classpathref</code> attribute seems to be correct).</p>
  
  <pre><code>&lt;path id="build.classpath"&gt;
      &lt;fileset dir="${lib.dir}"&gt;
          &lt;include name="**/*.jar"/&gt;
      &lt;/fileset&gt;
  &lt;/path&gt;
  
  &lt;target name="class_compile" depends="prepare" description="Compile the whole project"&gt;
      &lt;javac destdir="${build.classes}" 
              debug="${debug}" 
              deprecation="on"
              optimize="off"
              srcdir="${src.dir}"
              classpathref="build.classpath"
              includes="*/**"
      /&gt;
      &lt;copy todir="${build.classes}"&gt;
          &lt;fileset dir="${src.dir}" includes="**/*.properties"/&gt;
      &lt;/copy&gt;
  &lt;/target&gt;
  
  &lt;target name="prepare"&gt;
      &lt;mkdir dir="${build.dir}"/&gt;
      &lt;mkdir dir="${build.classes}"/&gt;
      &lt;path id="run.classpath" &gt;
          &lt;pathelement location="${build.classes}" /&gt;
      &lt;/path&gt;
      &lt;mkdir dir="${build.lib}"/&gt;
      &lt;mkdir dir="${qa.dir}"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Currently, once the <code>class_compile</code> target is executed multiple errors regarding missing class files are reported..</p>
  
  <pre><code>emma:
  Created dir: C:\capstonegroup3\TTTserver\build\emma-instr
  Created dir: C:\capstonegroup3\TTTserver\build\emma-reports
  prepare:
  Created dir: C:\capstonegroup3\TTTserver\build\classes
  Created dir: C:\capstonegroup3\TTTserver\build\lib
  Created dir: C:\capstonegroup3\TTTserver\build\qa-reports
  class_compile:
  C:\capstonegroup3\TTTserver\build.xml:152: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
  Compiling 21 source files to C:\capstonegroup3\TTTserver\build\classes
  C:\capstonegroup3\TTTserver\src\java\AuthServer\AuthenticationInterface.java:8: error: package javax.servlet.http does not exist
  import javax.servlet.http.HttpServletRequest;
  </code></pre>
  
  <p>Is there any way to set a <code>property</code> to the <code>tomcat apache/lib</code> directory, from persay a <code>.property</code> file? I saw in my <code>build_impl.xml</code> (generated by netbeans, that has a property file included during the <code>-init-private</code> target).</p>
  
  <pre><code>&lt;target depends="-pre-init" name="-init-private"&gt;
      &lt;property file="nbproject/private/private.properties"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>But I'm unsure how to gain access to those properties for my <code>build.xml</code>. But basically I'm after a solution that generates a relative path to the <code>apache-tomcat\lib</code> directory, and successfully compiles the class files without missing packages.</p>