cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <>
Subject cocoon 3: Javascript in jars
Date Wed, 14 Sep 2011 09:41:38 GMT

with cocoon 2.2 one can read javascript resources residing in separate 
jars like:

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

(the above is for loading javascript from the dojotoolkit. I made a 
separate maven project for Dojo, and make a cocoon-based project 
depending on it. I have different maven projects for different versions 
of Dojo.)

It seems that cocoon 3 is currently not supporting the resource 
protocol? A solution would be to physically have all the Dojo javascript 
located in a subdirectory dojoroot (for example), and in the sitemap 
have something like

<map:match pattern="dojoroot/**">
   <map:read src="dojoroot/{1}" mime-type="text/javascript"/>

(as in the example web application)

However, this is inconvenient, as one would need to copy dojo to a 
subdirectory for each project that requires dojo. The maven way is much 
more easier and certainly more elegant, as all projects requiring dojo 
are updated automatically.

My question is now: If there is no resource protocol, how can one 
achieve the above?


Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email:
University of Oulu, Finland  | WWW:
StruBioCat                   | WWW:
NordProt                     | WWW:
Triacle Biocomputing         | WWW:

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

View raw message