last I recall per this list was that this had some problems. I don't
remember when that was, so check the archives and bugzilla for 'loader'

Charlie

> -----Original Message-----
> From: Bill Barker [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2003 2:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Using a custom class loader to load webapp classes
> 
> 
> It is supposed to be supported by something like:
>   <Context .....>
>      <Loader className="com.myfirm.mypackage.MyLoader" ... />
>   </Context>
> 
> Never actually tried it myself, however.
> 
> "joe user" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello Tomcatters,
> >
> > I have an unusual question.  I have a webapp which
> > needs to load its classes from a source other than a
> > regular .jar file or a .class file.  It needs to get
> > them out of some other storage system, such as a
> > database.  Don't ask me why I need to do this strange
> > thing; I have my reasons for it.
> >
> > I have written a subclass of ClassLoader which does
> > this.  The question is, how do I get this to work with
> > Tomcat?  I was looking at the Tomcat source, and it
> > looks like all Webapp classes are loaded by
> > org.apache.catalina.loader.WebappClassLoader, which is
> > a subclass of URLClassLoader.  I can easily write a
> > subclass of WebappClassLoader which does what I need
> > it to do.  The question is, how do I get Tomcat to use
> > my new subclass instead of the default
> > WebappClassLoader itself?
> >
> > I looked in org.apache.catalina.loader.WebappLoader,
> > and see that it picks the webapp class loader by name,
> > and it has a method like this:
> >
> >     public void setLoaderClass(String loaderClass) {
> >         this.loaderClass = loaderClass;
> >     }
> >
> > Is there somewhere in the Tomcat config files where I
> > could set a string which gets passed to this method?
> > Also, if I do make my own subclass of
> > WebappClassLoader (call it SecureWebappClassLoader),
> > where should that class be put into the Tomcat
> > directory structure so that it can get loaded?
> >
> > Thanks for any advice on this unusual question.
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to