title: error: package javax.servlet.http does not exist
body: <p>I am trying to create my first servlet and I am getting the error above when I try to compile my code. I have read on stackoverflow that this is due to SE JDK not containing the servlet api. However, I am compiling from the command line with the following:</p>
  
  <pre><code>javac -classpath C:/Tomcat7/lib/servlet-api.jar; 
        -d ../classes com/example/web/BeerSelect.java.
  </code></pre>
  
  <p>As you can see I am making reference to the servlet-api on the command line. Please can you advise why I am still getting this error. I am using tomcat 7 </p>
  
  <p>thanks</p>
  
  <hr>
  
  <p><strong>Solution</strong></p>
  
  <p>For anyone that is interested..I located my problem. It was  problem with the Windows command shell and the fact that I had spaces in the directory names. I had the tomcat app saved as "tomcat 7" with a space. I was trying to reach it with "tomcat7" - that is no spaces.. The following line works  </p>
  
  <pre><code>javac -classpath .;C:/Tomcat7/lib/servlet-api.jar;
        -d ../classes com/example/web/BeerSelect.java
  </code></pre>