> From: cuco2772 [mailto:[EMAIL PROTECTED] > Subject: Configuring tomcat, servlet not found error > > This happens when I go to localhost:8080/servlet/HelloServlet.
And well it should. Such a URL indicates you're trying to use the invoker servlet, which was a truly atrocious invention, and has been disabled for years. > I did this: > javac -classpath > /usr/local/tomcat/apache-tomcat-6.0.14/lib/servlet-api.jar > HelloServlet.java You need to read the servlet spec (JSR-154) or at least look at the examples that come with Tomcat to find out how a servlet should be constructed. http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html > I added the folowing Context element to my context.xml, located in > $CATALINA_HOME/conf: A totally erroneous thing to do. That context.xml file is global to all deployed webapps, not just the one you wish it to be. > <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" You should never specify the path or docBase attributes in a properly located <Context> element. Put it back exactly the way it was. > My HelloServlet.class is located in .../webapps/ROOT/WEB-INF/classes Your servlet class should be part of a package. > In addition I added the following element to the bottom of my > ..../webapps/ROOT/WEB-INF/web.xml to try to provide some sort > of servlet mapping, I think: O.k., that change was correct. The URL to reference your servlet should simply be: http://localhost:8080/HelloServlet > I got this info mostly from doing Google research You either hit some really bad documentation, or you misinterpreted what you found. Read the real doc here: http://tomcat.apache.org/tomcat-6.0-doc/index.html > I need to set my java -classpath also No, you don't. The Tomcat startup scripts take care of that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]