tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Stacy <cst...@spacy.Boston.MA.US>
Subject class loading
Date Wed, 05 Jul 2000 18:01:41 GMT
I have two questions about class loading from my Tomcat servlet.

I have some classes stored under WEB-INF/classes/com/... but now I
want to move them to a different place on my CLASSPATH, outside of
the web-app.  The classes are a substructure that is used by many
of my applications, and I don't want a seperate copy of these class
files for each application.   So, I moved them to "/Java/Classes".
That's on the CLASASPATH, so they are found.

QUESTION 1:

One of those classes uses a ResourceBundle, and apparently those are
found in the class file directory.  For example, it will try to open
the file "/Java/Classes/LocalStrings.properties".  Is there some way
to make it look in the web-app directory instead?  I was sort of
hoping it would look somewhere in "WEB-INF", so that I could share
the class files among applications, but configure them seperately?

QUESTION 2:

My classes use reflection to try to load up another class.  This works
if all the classes are stored in the same place (eg. "WEB-INF/classes").

But I want to put the main classes in "/Java/Classes" and put the
dynamically loaded classes elsewhere ("WEB-INF/classes").
How do I get that to work?

Thanks!
Chris


Mime
View raw message