servlet mapping entails which directory you would like your classes to be or to be named, and where the actual servlet will be. Also, will it be mapped to a different name? That's typically a good idea, from what I've read.
i..e here's a blurb from the web.xml file what servlet mapping would look like. <servlet-mapping> <servlet-name>chngctrl.ChangeControlUserAcctServletSPCall</servlet-name> <url-pattern>/chngctrl/ChangeControlUsersSP.jsp</url-pattern> </servlet-mapping> that JSP you see is a "fake jsp" the file doesn't exist but that's where the action file from the form points. It actually calls the servlet instead, under the hood. But further up the page, you have to declare the servlet name, i.e. <servlet> <servlet-name>chngctrl.ChangeControlUserAcctServletSPCall</servlet-name> <servlet-class>chngctrl.ChangeControlUserAcctServletSPCall</servlet-class> </servlet> you could make a different name for your class from your servlet if you wanted, but I think most people don't...probably too confusing in the long run. -----Original Message----- From: Dean [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 29, 2007 11:23 AM To: 'Tomcat Users List' Subject: RE: 404 message when trying to test a servlet Thanks for the info. However, I am new to tomcat and servlets and as such am still somewhat unclear as to the resolution to this problem. Can you clarify. What exactly is servlet - mapping? Thanks, D -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Sent: Saturday, May 26, 2007 8:06 PM To: users@tomcat.apache.org Subject: Re: 404 message when trying to test a servlet "Dean" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > > > I suspect the class file may be in the wrong directory. I get the message > /basic-servlet/servlet/CurrencyConverter , which is confusing in that the > class file is in the following directory C:\Program Files\Apache Software > Foundation\Tomcat 4.1\webapps\basic-servlet\WEB-INF\classes. The html > page > is being found ok but when I do a submit and it tries to bring up the > servlet I get the above. > The invoker servlet has been disabled in the default config for ages (because it is evil :). You can enable it at your own risk in conf/web.xml, but that isn't recommended. Use an explicit servlet-mapping instead. Having classes in the default package will prevent you from upgrading later on. You really should put your class in a package. > > > I really appreciate any help you can give. > > > > P.s. when I start tomcat I only get the following messages > > Starting service Tomcat-Standalone > > Apache Tomcat/4.1.36-LE-jdk14 > > > > I am able to access http://localhost:8080/index.jsp > > > > Sincerely, > > > > D > > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]