beginner question:error 404 servlet not available in Tomcat

I have apache and tomcat4.1.30 on redhat 9 box. I made a webapp.conf on Apache,change server.xml also. I can view http://localhost/examples, see the servlet and jsp examples. Then I put welcom.html on my apache home folder: /var/www/html/welcom.html, I put the servlet.class at /webapps/examples/hello.class and also /webapps/examples/servlets/hello.class

Then I access http://192.168.0.2/welcom.html, when I click "get html", the error is: The requested resource (/examples/servlets/servletTest) is not available or The requested resource (/examples/servletTest) is not available

put the servlet.class at /webapps/examples/hello.class and also /webapps/examples/servlets/hello.class

Why in the world did you do that?

Couldn't you see that the class files in /examples/ are all under WEB-INF - thats required by the Servlet API. See this discussion on the JR FAQ for why you should NOT be using the /servlets/ nomenclature for serious work. Bill

may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68

posted May 31, 2004 20:55:00

0

I try another way after reading your suggestion,still problem, please have a look for my question.