> From: listan...@gmail.com [mailto:listan...@gmail.com] > Subject: Re: Servlet Error > > My Apache Tomcat version is 5.5.27. The servlet-api.jar is in > $CATALINA_HOME/common/lib.
Good; that's where it should be. However, since you're just starting with Tomcat, why not use the newer 6.0.x version, rather than one that's largely in maintenance mode? > I included it in the classpath and now the code > compiles without any errors. Make sure you do not put anything in the CLASSPATH environment variable, just specify the jar location with -classpath when compiling your files. Having jars accessible to more than one classloader while running Tomcat will cause errors. It's good practice to place all of your code in a package; it's not explicitly required for servlets, but it helps to keep things orgranized. > I am including my web.xml file below. You have mappings for a JSP-related file, but none for your servlet. If you don't actually have the .jsp, the existing servlet declaration and mapping should be removed. You do need to create the equivalent for your Hello class. Read the servlet spec for other information about what should be in web.xml. Look at the simpler webapps that come with Tomcat for samples. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org