I have installed java 7 on my machine. However, when i try to compile any servlet it is not able to locate any of the packages relating to servlets i.e. javax.servlet.* and javax.servlet.http.*.
I surfed the net and found that I need to have jsdk.jar. However, despite rummaging the net for an entire week, I could not find jsdk.jar. I was also directed to a page which says that I should download the servlet development kit, but the links provided in most of the pages on the net are old and redirect me to the oracle sun site, which does not have any such development kit. Now, it has become a nightmare for me to compile even a trifle servlet.
As you said, servlet-api.jar needs to be added in the class path. Just try out these options.
1) If you are running from cmd prompt, close and open a new window to compile. Since it may be resulting to the old one.
2) print and check the class path in cmd prompt
3) Try to remove spaces in the class path.