Once you compile HelloWorld.java, put HelloWorld.class in c:\Tomcat/webapps/ROOT/WEB-INF/classes. After compiling the code, access the servlet with the URL http://localhost/servlet/HelloWorld
U will get it this time. Nitin >===== Original Message From "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology." <[EMAIL PROTECTED]> ===== >Dear all, >I have set up Tomcat and seen the welcome page successfully. But I can't run servlet. For example, I wrote a simple servlet "HelloWorld.java" which prints "hello world" in brower, then put the "HelloWorld.class" file in Tomcat's "examples" directory. But when I visit it by http://localhost/examples/HelloWorld, Tomcat gives me an error message "The requested resource (/HelloWorld) is not available." However, jsp files could be executed properly. Does anyone know how to run my servlet? > >Thanks a lot! > >Sincerely >Ying >ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÓ¢éì¹»®&Þþǧu隊[h–+ -±êïþ6¯kû.Ÿ÷(™©ÝŠw%¹×¢žØ^n‡r¡ûazg¬±¨þÈ ž‡ßHDU,Dÿ ÔÄDD“ÿð+r¯zÏá¶Úÿÿö«r¯zÏãjöÿ²éÿr‰¿j·!Š÷¬þÇ«¾Wþ)íz·¬·ømšT^²‹«qëÿ†Ûiÿÿãjöÿ²éÿr ‰¿¦º¹ËlþÇ«¾Wýìmz¹Ú—úÞ²‹«qëÿ†Ù¥,„“HDUéiþ m§ÿÿÃÿ–Ê·÷(›ùšžæ¥³û¬z¿î±êÿ†Ù¥ ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html