cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <andre.juf...@oulu.fi>
Subject Re: cocoon 3: Javascript in jars
Date Wed, 14 Sep 2011 12:28:31 GMT
On 14/09/11 15:13, Francesco Chicchiriccò wrote:
> On 14/09/2011 13:58, Andre Juffer wrote:
>> On 14/09/11 14:35, Javier Puerto wrote:
>>> [...]
>>> AFAIK, Resource protocol is not yet implemented in Cocoon 3.
>>
>> There may be another way. It is possibly called differently? I tried 
>> "classpath://...", but didn't work either. E.g. Spring uses this 
>> protocol as well to load configuration located in jars. Very convenient.
>
> I did this in another (Cocoon3-based) project: It should be enough to 
> add a class like [1], then add a bean like as
>
> <!-- Using classpath: resources -->
> <bean 
> class="org.onehippo.forge.hct.cocoon.internal.ClasspathURLStreamHandlerFactory"/>
>
> in one of spring's XMLs.

Yes, this looks promising. So, this would mean that the following would 
work?

<map:match pattern="dojoroot/**">
<map:read src="classpath://dojoroot/{1}" />
</map:match>

I will try this (later today).

Thanks,
André


>
> Regards.
>
> [1] 
> https://forge.onehippo.org/svn/hct/trunk/core/src/main/java/org/onehippo/forge/hct/cocoon/internal/ClasspathURLStreamHandlerFactory.java
> -- 
> Francesco Chicchiriccò
>
> Apache Cocoon Committer and PMC Member
> http://people.apache.org/~ilgrosso/


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StrucBioCat                  | WWW: www.strucbiocat.oulu.fi
Triacle Biocomputing         | WWW: www.triacle-bc.com


Mime
View raw message