tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <>
Subject RE: web application deployment
Date Wed, 23 Aug 2000 08:50:54 GMT
Hi joel,

The url to a servlet is "virtual". You set up a mapping from some arbitrary
URL to a .class file
which implements the servlet interface. There doesn't need to be any such
path on disk. 

eg you can set up a mapping for
/foo/bar/xyz  to be the url for servlet  com.acme.coyote.Dinner
and there doesn't need to be any foo or bar directory, nor any file called

In short, you don't need a "servlet" directory, even though the url
"/servlet/abc" runs a servlet.

There is this thing called an "InvokerServlet" (configured in
$TOMCAT_HOME/conf/web.xml file)
that implicitly sets up a mapping of /servlet/{servletname} for each
<servlet> tag in your web
application's web.xml file. 

I am guessing that you have added something like:
to your web.xml file, no??

Alternately, perhaps you actually meant that you have a class
"testjdbc.class" in the
WEB-INF/classes directory? I haven't tried it, but perhaps when url
"/servlet/testjdbc" is
asked for, the "InvokerServlet" even tries to load a class of that name

Either way, the *best* solution is to add <servlet> and <servlet-mapping>
to the web.xml file in your web-application, to explicitly define the

> -----Original Message-----
> From:	joel cordonnier []
> Sent:	Wednesday, August 23, 2000 10:35 AM
> To:
> Subject:	web application deployment
> hi!
> I'm a new Tomcat user, and I have several questions:
> I have build a simple example named 'test' where an
> html file call a servlet. When I build the problem
> this result in a new directory webapps/test: an
> 'index;html' file and an WEB-INF/classes/test.class
> the servlet class and other files like web.xml
> In my index.html file, I have a tag
> href=servlet/testjdbc
> I add a new Context for this problem, and when I run
> this problem, it works !!!!!!!!!
> Why ??? when i call
> http://localhost:8080/test/serlet/testjdbc in my
> brower, it's work, BUT I DON'T HAVE ANY SERVLET
> DIRECTORY UNDER webapp/test !
> thanks for any help
> Joel Cordonnier
> ___________________________________________________________
> Do You Yahoo!?
> Achetez, vendez! À votre prix! Sur

View raw message