Do I understand this right?
If I place a jar file in a context's lib directory my classes should have
access to it? When I display System.getProperty("java.class.path") all
that appears is the $CLASSPATH with $TOMCAT_HOME/classes and the jar files
in the $TOMCAT_HOME/lib directory.
How do my servlets determine where it's supporting classes are? How are any
of my classes (especially my secure classloader) to know the location of
their servlet context?
According to the API, I can determine that the classes I need are in the
"myclasses.jar" file within the "lib" directory of the WEB-INF directory
under the directory named the same as my myWebApp.war file, but I have no
idea where myWebApp.war was placed:
$UNKNOWN_PATH/myWebApp/WEB-INF/lib/myclasses.jar
How do I figure out $UNKNOWN_PATH?
The end goal is to be able to create a .war file with just one set of
class files that can be easily deployable by simply placing the .war
file in the webapps directory. I'm finding that in order to deploy my
servlet application in Tomcat, I have to place the .war file in the
webapps directory, extract the particular .jar files and place them in
the $TOMACT_HOME/lib directory as well. This makes for difficult
deployment.
I use my own classloader as a part of an application framework, and this
classloader is integral to the framework, making it undesirable to by-pass
for servlet 2.2 deployment.
It uses the 1.2 delegation model by over-ridding findClass() and letting
loadClass() delegate loading up to the parent classloaders before calling
the custom-written findClass(), and it still cannot find any classes in
the myclasses.jar. Now I know that myclasses.jar is being accessed, because
the rest of the framework is being loaded via the web.xml deployment file.
Any help would be greatly appreciated.
Steve Cote
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]