cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Russell <p...@luminas.co.uk>
Subject [PATCH] Re: [C2] problem with getResource on Tomcat and JRun.
Date Mon, 07 Aug 2000 19:35:28 GMT
Hi all,

Murphys law. Found the problem almost immediately after
sending this. I *think* the semantics of getResource and
getSystemResource may have changed in JDK1.3. Calling
getResource on the class rather than the classloader,
and making sure the resource has a forward slash as its
first character appears to fix the problem. Someone wanna
check this works on a non-1.3 vm?

Patch follows:

Index: src/org/apache/cocoon/util/IOUtils.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/util/Attic/IOUtils.java,v
retrieving revision 1.1.2.3
diff -r1.1.2.3 IOUtils.java
52,53c52,53
<       return IOUtils.class.getClassLoader().getSystemResource(
<         location.substring("resource://".length())
---
>       return IOUtils.class.getResource(
>         "/" + location.substring("resource://".length())

-- 
Paul Russell                               <paul@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Mime
View raw message