[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:

    c:\myapp\foreign

Our application and development Java classes are in:

    c:\myapp\native

The root directory of the web server is:

    c:\myapp\native\web

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:

    c:\myapp\native\web\WEB-INF\web.xml
    
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"
        "http://java.sun.com/dtd/web-app_2_3.dtd";>

    <web-app>

        <servlet>
            <servlet-name>myapp</servlet-name>
            <servlet-class>com.myapp.servlet.BootStrap</servlet-class>
        </servlet>

        <servlet-mapping>
            <servlet-name>myapp</servlet-name> 
            <url-pattern>/myapp</url-pattern> 
        </servlet-mapping>

    </web-app>

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
required.

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to