I'm not using Tomcat, but I'm trying to learn servlets as well. The way I've been able to test them is to compile them exactly as you would a normal .java file. That is at the command prompt, type:
javac myfile.java
or if you're using some kind of software, like I'm using Jbuilder, I just compile it from the menu.
But once that's done, you move the .class file that was created after you compiled the .java file to the /servlet directory. Then from a web browser you type
http://localhost/servlet/myfile (replace localhost with the url to your web server where you saved your file followed by the path to where you saved your .class file).
This worked for me up till now, so I hope it works for you too!
Annette