You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthew Smith <ma...@brio.com> on 2002/10/08 08:22:42 UTC

Classpath and Aliases on Tomcat 4

G'Day,

I hope I'm not about to rehash an old subject here.  I couldn't find a
satisfactory answer in the mail archives.

I have a web-based application that is not designed as a webapp.  It has a
single servlet as its interface to the world.  This servlet, and all of its
supporting classes, are in a directory on the file system.  Some of the
classes are unpackaged, while most of them are in JAR or ZIP files.  It also
relies on another directory on the file system for images.  I am trying to
configure a webapp to use this application.  

I need to know how to do two things:  Add elements to the classpath from
elsewhere on the file system; and add a static directory to a web app (as in
the Alias command in the Apache web server).  Currently, I have created a
seperate web app for the static files and just pointed its base directory at
the images directory.  I was hoping for a better way (other than to use IIS
or Apache).  The classpath issue is  more difficult.

I was able to accomplish this in Tomcat 3 by passing the
-Dorg.apache.tomcat.apps.classpath="xxx" system property in the tomcat.bat
file.  Tomcat 4 (Catalina) doesn't seem to know about this property.  I
tried adding the path directly to Tomcat's classpath, but it seems that in
that case, the wrong class loader is used:  I get a NoClassDefFoundError on
HttpServlet.

Any suggestions anyone?  All help muchly appreciated.

Thanks,
Matt

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>