the procedure is as follows:-
1)execute the pgm to get .class file
2)copy .class file to
if your tomcat is in d:(assume)
d:\tomcat4.1\webapps\root\web-inf\class folder
if html file is also there then copy html file to
d:\tomcat4.1\webapps\root folder
3)change the XML file and give the url name
4)start tomcat server
5)call the servlet from the browser
and type the following in the html page
http://localhost:<port number>/<urlname>