tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Drzewiecki" <>
Subject JDTCompiler and locked jar files *again*
Date Fri, 17 Dec 2004 10:47:35 GMT
I think I finally found it. And fixed it.
JDTCompiler uses JasperLoader.getResourceAsStream() which is *not* 
overriden in JasperLoader and uses getResourceAsStream() derived from (in fact from java.lang.ClassLoader). 
j.l.ClassLoader's getResourceAsStream() implementation does not 
setUseCaches(false), therefore causes locking. I suggest overriding 
getResourceAsStream in JasperLoader by adding the following (or similar) 

    public InputStream getResourceAsStream(String name) {
        URL url = getResource(name);
        if (url != null) {
            try {
                URLConnection urlc = url.openConnection();
                return urlc.getInputStream();
            } catch (IOException e) {
                return null;
        return null;

This actually *WORKS* for me.


PS. I hope that I don't get cursed again.

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

View raw message