cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Cocoon 2.2 resources outside of a Block
Date Fri, 30 May 2008 22:16:56 GMT
Dominic Tootell pisze:
> Hi all,
> Apologies if this has been sent around before.

Hi Dominic,

Actually, if you was going to apologize for anything cross-posting to two lists would be my
choice. ;-)

> I'm trying to figure out how I can access resources outside of a Block 
> jar's, just from a directory within the Webapp:
> For example:
> I have the simple pipe line:
> <map:pipeline>
>         <map:match pattern="static/*.shtml">
>                 <map:generate src="content/{1}.xml"/>
>                 <map:serialize type="xml"/>
>         </map:match>
> </map:pipeline>
> This is part of the block called Homepage.   In Homepage block, I have 
> /src/main/resources/COB-INF/content/index.xml.  This is all fine, when 
> access the block via jetty and tomcat, the content/index.xml file is 
> served from COB-INF in the Homepage.jar.
> However, I don't want to have to store my xslt,  xml and all other 
> static files in a jar.  I don't want to have to re-jar the block and 
> redeploy it to tomcat or start up jetty each time I make a small change 
> an xslt.
> I want a directory content/ within my webapp, where index.xml is read 
> from there. i.e.:
> webapps/Homepage
>                               content/index.xml   <---- serve this .xml 
> file so I can make changes to it quickly and see the results
>                               WEB-INF/lib/Homepage.jar    <--- don't 
> look at COB-INF/content/index.xml, if the above exists.
> This is so I can do RAD development on my local development 
> environment.  This was possible in 2.1, but it seems in 2.2 I can't find 
> any documentation on how this is possible.  It seems like a simple thing….

Your resources should be always (or almost always) stored in a block. For RAD purposes we
created special helper plug-in[1] for Maven.

You can see it in action here:

Oh gosh, I forgot that I promised to publish it officially on our site. I'll try to do it
over this 


Grzegorz Kossakowski

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

View raw message