Ken Bowen wrote:
I think http://en.wikipedia.org/wiki/Java_Classloader was intended --
a reasonable starting point, with further references.
Thanks all. That was a good starting point.
Still not wanting to delve too deep into internals, but having read this:
http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html
and this:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
and quoting from a previous post on this list :
"The servlet spec states that jars are to be placed in WEB-INF/lib, so
that's what Tomcat implements; if the developer wants something beyond
that, a custom classloader is what's needed."
Now, if I wanted to do as suggested, so as to give "my webapp" a
classloader that will first look in some directory of my choice, prior
to looking into all the normal places, how would I, generally speaking,
go about it ?
I would (I guess) first attempt to locate the basic webapp classloader
class source of what Tomcat uses as a generic webapp classloader; then I
would either extend it, or make my own parallel version and compile it
into a .class file.
Then where would I put this .class file so that Tomcat notices and uses
my classloader for my webapp, rather than using its own ?
Putting my classloader class in the WEB-INF/classes of my webapp sounds
a bit like a circular argument, no ?
On the other hand, putting it in some area of the Tomcat common lib
would make it be picked for all webapps, which is not what I want
either. So how does that part work ? (very generically, I am not really
going to write my own classloader yet).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org