Even http://localhost:8080 - the port is also important , if it doesn't
works normally !

Hth,
Karthick


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ésS[h
-+
-±êïþ6¯kû.Y÷(T©ÝSw%¹×¢zØ^n?r¡ûazg¬±¨ þÈ z?ßHDU,Dÿ
ÔÄDD"ÿð+r ¯zÏá¶Úÿÿö«r ¯zÏãjöÿ²éÿr?¿j·!S÷¬þÇ«¾W­þ)íz·¬·ømsT^²<«qëÿ?Ûiÿÿãjöÿ²é
ÿr
?¿¦º ¹ËlþÇ«¾W­ýìmz¹Ú-úÞ²<«qëÿ?Ù¥,""HDU éiþ m§ÿÿà ÿ-Ê ·÷(>ùsz楳û¬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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___________________________________________________________________________
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

Reply via email to