cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: How to run block built with cocoon-22-archetype-block
Date Tue, 05 Dec 2006 06:38:59 GMT
Patrick Refondini wrote:
> Reinhard Poetz wrote:
>> Patrick Refondini wrote:
>>
>>> Reinhard Poetz wrote:
>>>
>>>> Patrick Refondini wrote:
>>>>
>>>>> Is there a cocoon-22-archetype-block working with the current trunk ?
>>>>
>>>>
>>>>
>>>> no, yesterday evening I've started to work on it.
>>>>
>>> Great ! I'll be please to give feedback when it is available.
>>
>>
>> please try (IIRC, the only thing you forgot was the blocks-fw-impl 
>> dependency)
> Indeed blocks-fw-impl was missing !
> 
> 
> I have tested referencing the a testblock from a testwebapp as follow:
> 
> Created testblock:
> 
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
> -DarchetypeArtifactId=cocoon-22-archetype-block 
> -DarchetypeVersion=1.0.0-M4-SNAPSHOT -DgroupId=ch.extentis 
> -DartifactId=testblock
> 
> Installed testblock
> 
> Created testwebapp
> 
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
> -DarchetypeArtifactId=cocoon-22-archetype-webapp 
> -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=ch.extentis 
> -DartifactId=testwebapp
> 
> Added testblock dependency to testwebapp POM:
> 
> <dependency>
>   <groupId>ch.extentis</groupId>
>   <artifactId>testblock</artifactId>
>   <version>1.0-SNAPSHOT</version>
> </dependency>
> 
> Added the following to testwebapp sitemap:
> 
> <!--  Reference any block by its blockContextURL / mount path ?  -->
> <map:match pattern="*/**">
>   <map:mount uri-prefix="{1}" src="blockcontext:/{1}/"/>
> </map:match>

This shouldn't be necessary to get some result from your testblock as it is 
automaticially mounted.

> Then after
> mvn package jetty:run
> 
> I could get testblock answer from localhost:8888/testblock/
> 
> 
> Is this the right way to proceed for referencing blocks from a webapp ? 
> I just discovered blockcontext: syntax lately.

see above

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------



	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Mime
View raw message