title: Processing Java servlet 'javax.servlet' package not found
body: <p>Not a very common implementation, but using Processing as a Java Servlet has been discussed in previous posts before (<a href="https://stackoverflow.com/feeds/user/243949">1</a>, <a href="https://stackoverflow.com/questions/1427105/rendering-images-with-processing-org-on-java-servlet">2</a>).  I have been developing a program in Processing to use as a Java servlet.  However, when I have code (such as like the first linked example) in a Processing sketch, I get the error message</p>
  
  <pre><code>The package 'javax.servlet' does not exist.  You might be missing a library.
  </code></pre>
  
  <p>I have Tomcat 5.5 service running on XP, and my environment variables are as follows</p>
  
  <pre><code>CLASSPATH = C:\tomcat\common\lib\servlet-api.jar
  CATALINA_HOME = C:\tomcat
  JAVA_HOME = C:\Program Files\Java\jdk1.6.0_21
  JRE_HOME  = C:\Program Files\Java\jre6
  </code></pre>
  
  <p>I have been trying to diagnose why the javax.servlet packages are not recognized by Processing for many hours and there is nothing online that seems to yield an explanation other than fixing the environment variables to recognize the tomcat libraries.  I have also tried to put the servlet-api.jar and jsp-api.jar files in Processing as a kind of custom Processing library but they are not recognized there either, nor when I try to run the program within the tomcat/webapps folder.</p>
  
  <p>I also have tried </p>
  
  <pre><code>javap -classpath my;class;path javax.servlet.Servlet
  </code></pre>
  
  <p>on the cmd and it gave me the same error.</p>
  
  <p>I'm not that good with Tomcat yet so please forgive me if this is a result of my unfamiliarity. If anyone more knowledgeable than I can shed some light as to why Processing cannot recognize this package would be tremendous.  Thanks so much~</p>