Java compilation gives errors about servlet libraries
问题 I am trying to compile a simple class that imports some servlet libraries. Since I have not added the tomcat directory to the classpath, what is the good practice way to let the system know where to look for the servlet libraries which are found in the tomcat/lib folder? Currently, the system just gives errors like this: ackage javax.servlet does not exist [javac] import javax.servlet.ServletException; 回答1: If you want to use only the java-provided tools, you will have to look at the JavaDocs