You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve D George <st...@uk.ibm.com> on 2002/02/12 15:34:23 UTC

Tomcat examples servlet URL mappings

Hi, I've just installed Tomcat for the first time and one thing that is
confusing me.

If you enter a URL of http://localhost:8080/examples/servlets/index.html,
you get to the servlets examples page  where there are six example
servlets.

If you hover over the link to the Hello World servlet the URL is
http://localhost:8080/examples/servlet/HelloWorldExample.

If you then look in the <tomcat_home>/webapps/examples/web-inf/classes
directory, you'll find the HelloWorldExample servlet, together with the
other servlet examples.

The thing confusing me is, why is there no servlet mapping in the web.xml
file for the HelloWorldExample servlet? I was expecting to see something
that mapped a URL of /servlet/HelloWorldExample to the HelloWorldExample
class in the classes directory? And since there is no mapping for this
servlet or all the other example servlets, how is the correct servlet
resolved from the URL?

I'm sure this is something dead simple.

Thanks for any help.

Cheers,

Steve George



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>