The compiler doesn't know the directory where you placed your jar files. Therefore, you should add those jar files to the javac classpath, before you can compile. ... and are you sure that it is TetSampleServlet.java and not TestSampleServlet.java ?