You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Davanum Srinivas <di...@yahoo.com> on 2001/06/20 19:08:40 UTC

[Patch] Load required file using the Context Class Loader (needed for Cocoon2)

Hi fop-team,

Some files like config.xml (in Options.java) and *.hyp (in Hyphenator.java) are loaded using
getResourceAsStream on the class itself. This will not work under some class-loaders for example
ServletExec3.1. We have faced this problem in many of the projects for example Xalan. The
suggested fix (see attached patch) is to try using the Thread Context ClassLoader and if that
fails then use the class'es getResourceAsStream as a fallback mechanism. I have tested this patch
in a few environments with no problems. 

The patch is against the latest CVS. Please accept this patch. This will enable Cocoon2 to work
without problems. This will not break anything that works now.

Thanks,
dims




=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/