On 4/5/07, Grzegorz Kossakowski <[EMAIL PROTECTED]> wrote:
Lally Singh napisaĆ(a):
> Hey all,
>
> I've got a class that I'm trying to feed in an XML file for
> configuration. So, two questions:
> 1. What's the URL format? If it's in my block's COB-INF directory
> 2. What URL resolver should I use to get at that file?
>
> Thanks in advance, and for everything so far,
I don't understand what you exactly want to achieve. Could you elaborate
a little bit?
Of course, sorry -- too much late night hacking.
I've got a class I'm setting up with a Spring bean. E.g:
<bean id="orgChart"
class="edu.vt.iddl.meval.org.spring2007.OrgChart2007"
>
<!-- an XML file describing the organization chart -->
<property name="orgFile">
<value>cocoon:block:/resources/orgChart207.xml</value>
</property>
</bean>
I'm not sure about either the format for this URI, which should refer
to a block-private XML file (nor even exactly where to put those,
would they be COB-INF?), nor how to resolve such a URI into a proper
filename at runtime.
My best guess for the latter is to use my WebAppContext's
getResource(uri).getURL() method, and the URI above's the best guess
at the format.
Thanks again,
-ls