tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Davis <>
Subject Classpath Conundrum (2nd try)
Date Thu, 17 Jul 2003 14:41:18 GMT
[I apologize is this message is a dupe.  I had trouble sending messages
to this group from a hotmail account.]

I have been tasked with trying to get a legacy Java Servlet based
application running under Tomcat 4.1.24 -- The application currently
runs on JRun 2.3.3

On of the requirements imposed upon me is that I can't disturb the
existing directory structure.  I can't rename or move any directories
(or their contents).

Our third-party Java classes are in:


Our application and development Java classes are in:


The root directory of the web server is:


I created the following Context in server.xml:

    <Context path="/tomcat" docBase="c:/myapp/native/web" debug="0"/>

Then I created the servlet deployment file:

The contents of said file:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"





So now I'm all set to go, except that I'm going to (and did) get a
"class not found" error because there is no "/classes" directory under
"WEB-INF" and as mentioned above I can't copy the classes from
"/foreign" and "/native" there.  

I can't create a symbolic link from "/classes" to "/native" since that
would be recursive, and it wouldn't include "/foreign" which is also

The "/native" and "/foreign" directories are in the CLASSPATH
environment variable, but as documented in "Class Loader HOW-TO" that
variable is ignored by the class loaders.

It would seem to me that the easiest and most straight-forward solution
is to get the class loaders to honor the CLASSPATH environment
variable.  I tried to accomplish this by hacking the start-up scripts,
but could not get it to work.

Could somebody please help me out here?  What's the best way to get the
class loader to look in "/native" and "/foreign"?  Or is there a better
solution (other than shuffling the directories around, which I can't
do).  Thanks a million!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message