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

Reply via email to