I have installed Tomcat 4.1.12 on Red Hat Linux 7.2. Starts OK. Runs all the examples. I created the new web application: $CATALINA_HOME/webapps/test ./test/index.jsp ./test/WEB-INF ./test/WEB-INF/web.xml ./test/WEB-INF/classes ./test/WEB-INF/classes/HelloWorld/Example.class I added the <Context> entry in server.xml within the <host></host> tags. index.jsp runs just fine. If I try to execute the servlet from the index.jsp page or by http://localhost:8080/test/servlet/HelloWorldExample I keep getting the HTTP Status error 404: "The requested resource (/servlet/HelloWorldExample) is not available." I'm at wit's end. Can somone help? Thanks, Phil
As a security risk, the "/servlet/" technique of invoking servlets has been deprecated. It's better if you set up a servlet declaration + URL mapping in the web.xml file.
Being persecuted doesn't in any way prove your righteousness or your beliefs. Many people get persecuted because they are repugnant or annoying. Or just because they can be.
posted 17 years ago
Rene - Thanks for your response. The name of the servlet is "HelloWorldExample.class". I've tried shortening the class name and I still get the same problem. I've also already added the <servlet></servlet> declaration to the web.xml file. Have any other suggestions? Phil Tim - thanks for your response. I understand the security risk of the "/servlet/" technique. I am just trying to get a servlet to execute. Would you have an example of a servlet declaration +URL mapping that I could look at? Phil