After configuring servlet API path to compile the Servlet path follow the following steps.
1. Open command prompt(Start -> Run ) and type cmd + (Enter Key) 2. Change the directory to the Servlet file(i.e .java) and 3. type javac to compile the servlet file and if you have defined the package then compile it with the command as : javac -d . ServletFileName.java 4. Now Place that ServletFileName.class file into your project's "web-inf/classes" directory.