cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <patrick.refond...@pobox.com>
Subject Re: Cocoon 2.2 - how to wire block into webapp
Date Tue, 24 Oct 2006 22:46:15 GMT
Felix Knecht wrote:
> HI Patrick
> 
> 
>>Hi,
>>I have created a webapp named test and a block named demo
>>
>>They've been created using the cocoon-22-archetype-webapp and
>>cocoon-22-archetype-block
>>
>>Now I have introduce a dependency in test webapp on demo block:
>>(...)
>>  <dependencies>
>>(...)
>>    <dependency>
>>      <groupId>ch.smartgene</groupId>
>>      <artifactId>demo</artifactId>
>>      <version>1.0.0-SNAPSHOT</version>
>>    </dependency>
>>  </dependencies>
>>(...)
>>
>>I can see the demo block is deployed into the test webapp.
>>
>>My questions:
>>
>>1. Is the above the right way to include blocks into webapp with Cocoon
>>2.2 ?
> 
> 
> This looks ok to me.
> You need to install the block using mvn install.
> 
> 
>>2. If 1. is no wrong then how can test webapp make use of what is
>>available in demo block (URL conventions /demo /blocks/demo ... to be
>>defined ?)
> 
> 
> The url /block/demo should be the right one. You need to start the
> (web-)application first:
> - Goto the block directory and install the block (mvn install)
> - Goto to the webapp directory
> - Start the application: mvn cocoon:deploy jetty6:run (I'm not sure if
> cocoon:deploy is still needed)	
> - Point your browser to http://localhost:8888/block/demo
I went around target directory instead of focusing on src/main/webapp
it helped me understand that what I was missing was simply a sitemap 
mount such as:

<map:match pattern="demo/*">
     <map:mount
         uri-prefix="demo/"
         check-reload="yes"
         src="blocks/demo/sitemap.xmap" />
</map:match>

in order to have the demo block resource accessible.
Just need to get into this new topography :)
Although I found CocoonGT 2006 resources very valuable to understand a 
bit more of this new block concept.
http://wiki.apache.org/cocoon/GT2006Notes

Thanks, Felix

ps: I seem to have trouble with the user list. I cannot see any post 
neither others nor mine... Do anyone experience similar behaviour.
I have seen new post on the dev list.

> 
> Port configuration can be found in test/pom.xml (test = webapp directory)
> 
> 
>>Any hints or direction to examples, documentation are welcome.
> 
> 
> Sample for webapp: {cocoon2.2-src}/core/cocoon-webapp
> Sample for block:  {cocoon2.2-src}/blocks
> 
> Felix
> 
> 
>>Patrick
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message