cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Markus <>
Subject Re: Accessing resource from reader
Date Fri, 18 Sep 2009 06:19:01 GMT

depends on file location. is it in your classpath use
as file inside your sitemap structure try (in BarcodeImageReader.setup )

Context context = ObjectModelHelper.getContext(objectModel);
File file = new File(context.getRealPath("barcode-cfg.xml"));

location is relative to your sitemap


Radaven schrieb:
> Hi, I am working on my BarcodeImageReader which generates barcode image. The
> parameters of barcode are loaded from xml config file (saved on same place
> as other resources like jx templates, etc.). 
> How can I get to this file to have it as I guess I cannot use
> something like 
> File file = new File("barcode-cfg.xml");
> Is there some getResource method or something like that available?

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

View raw message