Howdy, You also want to add a <servlet-mapping> element for this servlet. The book assumes the invoker servlet is available.
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Monday, June 23, 2003 1:49 PM >To: [EMAIL PROTECTED] >Subject: RE: RE: Getting servlet to run > >My book lists this servlet element to be included in the web.xml file in >the application root directory. I had already added it, so my the web.xml >file for my non-functioning servlet looks like this: > ><?xml version="1.0" encoding="ISO-8859-1"?> > ><!DOCTYPE web-app PUBLIC > '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' > 'http://java.sun.com/j2ee/dtds/web-app_2_3.dtd'> > ><web-app> > <servlet> > <servlet-name>login</servlet-name> > <servlet-class>chapter2.login</servlet-class> > </servlet> ></web-app> > >Any thoughts? >-- >Charles Knell >[EMAIL PROTECTED] - email > > > >-----Original Message----- >From: "Shapira, Yoav" <[EMAIL PROTECTED]> >Sent: Mon, 23 Jun 2003 13:01:38 -0400 >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Subject: RE: Getting servlet to run > > >Howdy, >Part of the problems with books is that they fall out of date with the >product. Specifically here, the invoker servlet is disabled by default >in tomcat 4.1.24. The invoker servlet is what runs URLs like >/servlet/servletClassName. > >You can comment in the invoker servlet mapping in >$CATALINA_HOME/conf/web.xml, or properly define and map your servlets in >the web.xml file for your applications. > > >Yoav Shapira >Millennium ChemInformatics > > >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >>Sent: Monday, June 23, 2003 12:56 PM >>To: [EMAIL PROTECTED] >>Subject: Getting servlet to run >> >>Environment: >>Windows XP, Tomcat 4.1.24, Sun JVM 1.4.1_02-b06 >> >>I managed to fix my problem running JSPs in an application directory I >>created. Now I'm moving on to getting a servlet to run. I have copied >and >>compiled two servlets from different books. One I put in "D:\Program >>Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes". The second >>one, which is part of a package called "chapter2" I put in "D:\Program >>Files\Apache Group\Tomcat 4.1\webapps\apress\WEB-INF\classes\chapter2". >>Both compiled without complaint. I stopped and re-started Tomcat and >>pointed my browser at each in turn and got these messages: >> >>"The requested resource (/servlet/HelloWorld) is not available." >> >>"The requested resource (/apress/servlet/chapter2.login) is not >available." >> >>The log file doesn't show anything suggesting a problem. Do all rank >Tomcat >>beginners have this much trouble? If so, how did it get to be so >popular? >>Can anyone suggest an approach? Thanks. >> >>-- >>Charles Knell >>[EMAIL PROTECTED] - email >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary and/or privileged. This e-mail is intended only for the >individual(s) to whom it is addressed, and may not be saved, copied, >printed, disclosed or used by anyone else. If you are not the(an) intended >recipient, please immediately delete this e-mail from your computer system >and notify the sender. Thank you. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
