> -----Original Message-----
> From: Scott Goldstein [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, October 31, 2000 12:05 AM
> To: [EMAIL PROTECTED]
> Subject: server.xml and individual servlets
>
> I'm fairly new to Tomcat and I have a configuration question.
>
> I want to register a number of individual servlets without grouping them
> under a web application as follows:
>
> path = domain/servlet1 will invoke servlet1
> path = domain/servlet2 will invoke servlet2
> .
> .
> .
>
>
>
> It seems that a "Context" tag will define a complete web app causing
> Tomcat to locate servlets specified in an associated Web Application
> Deployment Descriptor. Is there another tag in the server.dtd that will
> allow me to specify individual servlets as I've described above?
>
> Thanks for the info.
>
> Scott
[Kitching Simon]
Hi Scott,
I don't think that it is possible to have servlets that are not
in *any* context. In fact, considering that the sun servlet
spec defines methods like "get parent context" for
servlets, it seems kinda tricky :-)
Perhaps you are just trying to do away with the /webappname/..
prefix on the urls? If so, then what you do is go into the
$TOMCAT_HOME/server.xml file, and create a context
entry whose "path" attribute is the empty string, and whose
docRoot is the docroot for your stuff. If you look
at the examples, you will see that the "ROOT" webapp is
set up this way, and that the jsps, htmls, servlets, etc.
of the ROOT webapp can be accessed without any prefix.
Of course, there can only be one context with path=""...
Regards,
Simon