cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominic Tootell" <dominic.toot...@bbc.co.uk>
Subject RE: Database connection by cocoon 2.2
Date Fri, 06 Jun 2008 15:16:11 GMT
Cool on getting it working,

The
src/main/resources/META-INF/cocoon/avalon/custom-sitemap-compents.xconf
doesn't exist out of the box when you create a block from an artifact.
But, you can create it yourself. 


More details:

Inside the cocoon-core-2.2.0.jar there is a file in the
org/apache/cocoon directory called cocoon.xconf containing:

	<cocoon version="2.2">

	  <!--
	    - Include the core roles definitions. This is for the sake
of clarity,
	    - as they are implicitely loaded at startup, but we may want
to remove
	    - this implicit behaviour in the future now that we have the
include
	    - mechanism.
	    -->
	  <include src="resource://org/apache/cocoon/cocoon.roles"/>
	
	  <!--
	    - Include all configuration files (for core and blocks) from
within the classpath.
	    -->
	  <include dir="classpath*:META-INF/cocoon/avalon"
pattern="*.xconf"/>
	</cocoon>


So I guessed this means that you can create any old .xconf file in a
blocks' META-INF/cocoon/avalon directory. This means you can centralise
any generic xconf configuration that you would normally have in cocoon
2.1's parent sitemap; in a CentralConfigurationBlock in 2.2 for example.
Then any other blocks you develop in Cocoon 2.2 can just have a
dependency on that one block.  


Happy you got it working.

/dom

-----Original Message-----
From: Johannes Hoechstaedter [mailto:j.hoechstaedter@memocomp.de] 
Sent: 06 June 2008 16:06
To: users@cocoon.apache.org
Subject: Re: Database connection by cocoon 2.2

ok, I managed it. There were some spelling errors, and some more
modifications ;), but I have some datas on the screen, thanks.

Johannes Hoechstaedter schrieb:
> Hi Dominic
>
> I tried, but I failed :). I didn't foun the  file 
> src/main/resources/META-INF/cocoon/avalon/custom-sitemap-compents.xcon
> f so I put the content into my sitemap.xmap. I don't have an orcale 
> db, so I replaced everything oracle sepcific by mysql data and adapted

> ehe sql string. On "mvn jetty:run" I get the error
>
> java.lang.RuntimeException: Cannot invoke listener 
> org.springframework.web.context.ContextLoaderListener
>
> But your idea is then nearest to mine. Tramsform data from the 
> database into xml and show it, and the other way round.
>
> cheers Johannes
>
>
>
> ---------------------------------------------------------------------
> 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


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are
not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify
the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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


Mime
View raw message