In order that it will work the d:/xx/yy/zz/webpages/ directory should be in
the classpath variable before running Tomcat,
so Tomcat can find your servlet.
Another way, and actually the standard one, is to create WEB-INF/classes
directory under d:/xx/yy/zz/webpages/
and put there your servlets. This directory is automatically added to the
classpath of Tomcat, and you do not
need to add anything.
You can look at the webapps directory that comes with Tomcat installation,
the servlets examples are in this
exact structure.
Eitan
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Servlet not in webapps directory
>
>
> > In the server.xml you can define a new Context that maps
> between context
> > and
> > actual directory.
> >
> > In the following example calling servlets through
> > http://your.company.com/tt/servlet/myservlet
> > will launch the servlets from d:/xx/yy/zz/webpages
> >
> > <Context path="/tt" docBase="d:/xx/yy/zz/webpages"
> > crossContext="true" debug="0" reloadable="true" trusted="false"/>
> >
> > if you want to call servlets from the server root set the
> path to "".
> >
>
> I tried that, but it doesn't work :
> with the URL http://your.company.com/tt/ I get the tree of
> the directory
> d:/xx/yy/zz/webpages/
>
> but when I try http://your.company.com/tt/servlet/myservlet
> or even http://your.company.com/tt/myservlet
> I get a 404 error and I don't understand why.
>
> In the webpages directory, must there be special folders ?
> And I wonder if I must put something in the http.conf or in
> my mod_jk.conf
> ...
>
> Please help !!! ;o)
> Thanx in advance...
>
> --
> Sent through GMX FreeMail - http://www.gmx.net
>