tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: [OT] Deleting URLClassloader Cached Jars/Classes
Date Mon, 02 Apr 2012 21:33:25 GMT
2012/4/3 Christopher Schultz <>:
>> Is there a way to empty this cache, or disable caching all
>> together?
> Not without implementing your own ClassLoader. You could read the code
> for WebappClassLoader to see how it's done in there.

+1. You need your own class loader.

I would say org.apache.jasper.servlet.JasperLoader.  It is classloader
that is used to load JSP pages.  If the page is updated you just throw
classloader instance away together with the classes that it loaded.

In recent JVMs there is also an option to reload a class in memory
(aka hot-swap). That is used by debuggers, when you debug your program
in an IDE and want to continue with updated (edited) version of the
class without restarting all over.

It is not something that you would use from inside the JVM though.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message