> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: classloaders ?
>
> 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.

There's another approach, semi-supported by Tomcat, as noted in this thread:
http://marc.info/?l=tomcat-user&m=119515455807928&w=2

The VirtualWebappLoader supports additional paths beyond WEB-INF/lib and 
WEB-INF/classes; however, since it's undocumented and Tomcat-specific, I'm a 
bit hesitant to suggest it for production environments.

> Then where would I put this .class file so that Tomcat
> notices and uses my classloader for my webapp, rather
> than using its own ?

The custom classloader is specified via a <Loader> element inside your webapp's 
<Context> element:
http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to