March 10, 2010 at 10:33 AM
You can simply save your java file in classes folder of your tomcat and compile it. Compilation is necessary.
March 10, 2010 at 10:35 AM
Then your java file and its class file, both get placed in the classes folder.
March 10, 2010 at 10:44 AM
not only the compilation is mandatory even you have to mention those details in you web.xml file. Then only your servlet program will work. By simply keeping the file in class folder will not make any sense. Whatever class files you are keeping in the class folder all should declare in your web.xml file.
Fore more details log on to the below mentioned site:http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp
Hope this may help you..