You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wolfgang Stein <zo...@gmd-net.de> on 2000/05/18 17:05:58 UTC
location of servlets
I have a lot of servlets and i dont want to put them all
into the directory 'classes'.
Is it possible to use physical pathes in the web.xml file
an did anybody succeed with an entry like the one listed below ?
<servlet>
<servlet-name>
MyServlet
</servlet-name>
<servlet-class>
E:/xxxx/yyyy/MyServlet
</servlet-class>
</servlet>
Thanks in advance
Wolfgang
Re: location of servlets
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Wolfgang Stein wrote:
> I have a lot of servlets and i dont want to put them all
> into the directory 'classes'.
>
> Is it possible to use physical pathes in the web.xml file
> an did anybody succeed with an entry like the one listed below ?
>
> <servlet>
> <servlet-name>
> MyServlet
> </servlet-name>
> <servlet-class>
> E:/xxxx/yyyy/MyServlet
> </servlet-class>
> </servlet>
>
This is not possible. The reason is that a web application is intended to be
self contained, with no references to outside resources.
However, you could package up your servlets in a JAR file in the WEB-INF/lib
directory if you want a neat and tidy web application. All such JAR files are
automatically added to the class path for your application, just like the
WEB-INF/classes directory itself is.
>
> Thanks in advance
> Wolfgang
>
Craig McClanahan