tomcat does not use the classpath. your classes must go under
/tomcat/common/lib or within your context.

you can try soft links, but they are disabled in 4.1.x by default.

for your static files, just create a directory under your context - then you
can access it as a subdir in your url.

you also need to rename your .zip files that contatin classes to .jar

Charlie

> -----Original Message-----
> From: Matthew Smith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 08, 2002 2:23 AM
> To: Tomcat Users List (E-mail)
> Subject: 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:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to