|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Database connection by cocoon 2.2Hi,
I do my first experiences in cocoon, and want to create a database webapplication which connects to a database. I did some first steps to a database application. Is there a complete how to, to etablish a database connection (for read and write access) by cocoon 2.2? What I already did: * I did all steps for a first cocoon application which are described in http://cocoon.apache.org/2.2/1159_1_1.html . That works. * The I added a file databases-driver.properties with the path of the driver into META_INF/cocoon/properties, as described in the migration guide (http://cocoon.apache.org/2.2/blocks/databases/1.0/1409_1_1.html). * The I added the dependency for cocoon-databases-impl into my pom.xml as described in the documentation about the block http://cocoon.apache.org/2.2/blocks/databases/1.0/1437_1_1.html . But I have not managed to etablish a connection. There are some for me quite understandable descriptions for cocoon 2.1 on http://cocoon.apache.org/2.1/developing/datasources.html . But I don't know if these are good for 2.2. Maybe some more informations are necessary: The application should be run on tomcat, and manage a connection to a mysql or oracle database. Thank you for every help in advance. Johannes --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2Johannes -- you may want to search for tutorials on using databases with
Spring. My understanding is that with Cocoon 2.2 it is best to have Spring configure and manage any database connections. Then you can add Cocoon features (eg, the SQL transformer or whatever) once that is set up. Bng On Thu, 2008-06-05 at 18:33 +0200, Johannes Hoechstaedter wrote: > Hi, > > I do my first experiences in cocoon, and want to create a database > webapplication which connects to a database. I did some first steps to a > database application. Is there a complete how to, to etablish a database > connection (for read and write access) by cocoon 2.2? > > What I already did: > > * I did all steps for a first cocoon application which are described in > http://cocoon.apache.org/2.2/1159_1_1.html . That works. > * The I added a file databases-driver.properties with the path of the > driver into META_INF/cocoon/properties, as described in the migration > guide (http://cocoon.apache.org/2.2/blocks/databases/1.0/1409_1_1.html). > * The I added the dependency for cocoon-databases-impl into my pom.xml > as described in the documentation about the block > http://cocoon.apache.org/2.2/blocks/databases/1.0/1437_1_1.html . > > But I have not managed to etablish a connection. > > There are some for me quite understandable descriptions for cocoon 2.1 > on http://cocoon.apache.org/2.1/developing/datasources.html . But I > don't know if these are good for 2.2. > > Maybe some more informations are necessary: The application should be > run on tomcat, and manage a connection to a mysql or oracle database. > > Thank you for every help in advance. > Johannes > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2Bng
It would be very useful if you, or anyone in the community, could identify or recommend such tutorials - on a quick search I was not able to find anything useful - although: http://www.codesuccess.com/tutorials/spring/pagination/ and http://www.netbeans.org/kb/61/web/quickstart-webapps-spring.html might be related. Not sure if there anyway of doing this with Spring alone - does one also need Hibernate (more stuff to learn!!) Derek >>> On 2008/06/05 at 07:57, in message <1212688626.22030.58.camel@...>, Boris Goldowsky <bgoldowsky@...> wrote: Johannes -- you may want to search for tutorials on using databases with Spring. My understanding is that with Cocoon 2.2 it is best to have Spring configure and manage any database connections. Then you can add Cocoon features (eg, the SQL transformer or whatever) once that is set up. Bng On Thu, 2008-06-05 at 18:33 +0200, Johannes Hoechstaedter wrote: > Hi, > > I do my first experiences in cocoon, and want to create a database > webapplication which connects to a database. I did some first steps to a > database application. Is there a complete how to, to etablish a database > connection (for read and write access) by cocoon 2.2? > > What I already did: > > * I did all steps for a first cocoon application which are described in > http://cocoon.apache.org/2.2/1159_1_1.html . That works. > * The I added a file databases-driver.properties with the path of the > driver into META_INF/cocoon/properties, as described in the migration > guide (http://cocoon.apache.org/2.2/blocks/databases/1.0/1409_1_1.html). > * The I added the dependency for cocoon-databases-impl into my pom.xml > as described in the documentation about the block > http://cocoon.apache.org/2.2/blocks/databases/1.0/1437_1_1.html . > > But I have not managed to etablish a connection. > > There are some for me quite understandable descriptions for cocoon 2.1 > on http://cocoon.apache.org/2.1/developing/datasources.html . But I > don't know if these are good for 2.2. > > Maybe some more informations are necessary: The application should be > run on tomcat, and manage a connection to a mysql or oracle database. > > Thank you for every help in advance. > Johannes > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2Good morning Bng,
I know, cocoon is based on spring. But isn't there another possibility with cocoon blocks only? There is this database-block. What it is good for, when I have to write my own spring application? I want to write as less code as possible. Johannes > Johannes -- you may want to search for tutorials on using databases with > Spring. My understanding is that with Cocoon 2.2 it is best to have > Spring configure and manage any database connections. Then you can add > Cocoon features (eg, the SQL transformer or whatever) once that is set > up. > > Bng > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
Re: Database connection by cocoon 2.2The linked sample is nice, and basically exactly what I am looking for.
I have already searched on http://cocoon.apache.org/2.1/ on how I can etablish a database connection. You need an entry int your web.xml and in your cocoon.xconf for example. Where is the cocoon.xconf in 2.2? Where can I define my datasources? Where can I get the code of the sample? Johannes Derek Hohls schrieb: > Johannes > > Good question! The "official and best" way is to use Hibernate and > Spring; > this will, IMO, mean writing *lots* of code. You can use flowscript > instead, > for simple cases, but be warned that many here will point out the > potential > flaws in this approach. > > In the 2.1.x series of Cocoon, there was a sample that showed this > approach: > eg. see > http://cocoon.jsp-servlet.net/samples/blocks/forms/ > and look for "Database access". > > I am not sure if you will be able to replicate this in 2.2? > > Derek > > >>> On 2008/06/06 at 10:05, in message <4848EFB2.4090109@... > <mailto:4848EFB2.4090109@...>>, Johannes Hoechstaedter > <j.hoechstaedter@... <mailto:j.hoechstaedter@...>> wrote: > Good morning Bng, > > I know, cocoon is based on spring. But isn't there another possibility > with cocoon blocks only? There is this database-block. What it is good > for, when I have to write my own spring application? I want to write as > less code as possible. > > Johannes > > > Johannes -- you may want to search for tutorials on using databases with > > Spring. My understanding is that with Cocoon 2.2 it is best to have > > Spring configure and manage any database connections. Then you can add > > Cocoon features (eg, the SQL transformer or whatever) once that is set > > up. > > > > Bng > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > <mailto:users-unsubscribe@...> > For additional commands, e-mail: users-help@... > <mailto:users-help@...> > > -- > This message is subject to the CSIR's copyright terms and conditions, > e-mail legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > > This message has been scanned for viruses and dangerous content by > *MailScanner* <http://www.mailscanner.info/>, > and is believed to be clean. MailScanner thanks Transtec Computers > <http://www.transtec.co.uk/> for their support. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2I haven't investigated what the databases block does in 2.2. In Cocoon
2.1, you could use it for simple database queries just by giving it a JDBC connection; but since it didn't help much with database updating, we never used it much. I imagine much the same is true in 2.2. However, I do have something that may be useful to contribute, which is a working sample application. I will post that in a separate thread. Bng On Fri, 2008-06-06 at 10:05 +0200, Johannes Hoechstaedter wrote: > Good morning Bng, > > I know, cocoon is based on spring. But isn't there another possibility > with cocoon blocks only? There is this database-block. What it is good > for, when I have to write my own spring application? I want to write as > less code as possible. > > Johannes > > > Johannes -- you may want to search for tutorials on using databases with > > Spring. My understanding is that with Cocoon 2.2 it is best to have > > Spring configure and manage any database connections. Then you can add > > Cocoon features (eg, the SQL transformer or whatever) once that is set > > up. > > > > Bng --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2You probably already have looked at it, but the documentation on
springframework.org is actually very good (something for Cocoon to aspire to ;-) -- the section on database access is at http://static.springframework.org/spring/docs/2.5.x/reference/jdbc.html You can certainly work with the Spring database API directly and not involve Hibernate if you so choose. We use Hibernate because we like to conceptualize a database as holding Java objects, not just tables of data. Bng On Fri, 2008-06-06 at 08:45 +0200, Derek Hohls wrote: > Bng > > It would be very useful if you, or anyone in the community, could identify or > recommend such tutorials - on a quick search I was not able to find > anything useful - although: > http://www.codesuccess.com/tutorials/spring/pagination/ > and > http://www.netbeans.org/kb/61/web/quickstart-webapps-spring.html > might be related. > > Not sure if there anyway of doing this with Spring alone - does one also > need Hibernate (more stuff to learn!!) > > Derek > > >>> On 2008/06/05 at 07:57, in message <1212688626.22030.58.camel@...>, Boris Goldowsky <bgoldowsky@...> wrote: > Johannes -- you may want to search for tutorials on using databases with > Spring. My understanding is that with Cocoon 2.2 it is best to have > Spring configure and manage any database connections. Then you can add > Cocoon features (eg, the SQL transformer or whatever) once that is set > up. > > Bng > > > > On Thu, 2008-06-05 at 18:33 +0200, Johannes Hoechstaedter wrote: > > Hi, > > > > I do my first experiences in cocoon, and want to create a database > > webapplication which connects to a database. I did some first steps to a > > database application. Is there a complete how to, to etablish a database > > connection (for read and write access) by cocoon 2.2? > > > > What I already did: > > > > * I did all steps for a first cocoon application which are described in > > http://cocoon.apache.org/2.2/1159_1_1.html . That works. > > * The I added a file databases-driver.properties with the path of the > > driver into META_INF/cocoon/properties, as described in the migration > > guide (http://cocoon.apache.org/2.2/blocks/databases/1.0/1409_1_1.html). > > * The I added the dependency for cocoon-databases-impl into my pom.xml > > as described in the documentation about the block > > http://cocoon.apache.org/2.2/blocks/databases/1.0/1437_1_1.html . > > > > But I have not managed to etablish a connection. > > > > There are some for me quite understandable descriptions for cocoon 2.1 > > on http://cocoon.apache.org/2.1/developing/datasources.html . But I > > don't know if these are good for 2.2. > > > > Maybe some more informations are necessary: The application should be > > run on tomcat, and manage a connection to a mysql or oracle database. > > > > Thank you for every help in advance. > > Johannes > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2Johannes
Just curious - is there a pressing reason to use 2.2? Why not download and work with 2.1 (which ships with the sample code you requested). Again, IMO, 2.2 still needs more work - esp. docs and simple examples - in making it accessible to the "average" user. Cheers Derek >>> On 2008/06/06 at 01:37, in message <48492181.2080406@...>, Johannes Hoechstaedter <j.hoechstaedter@...> wrote: The linked sample is nice, and basically exactly what I am looking for. I have already searched on http://cocoon.apache.org/2.1/ on how I can etablish a database connection. You need an entry int your web.xml and in your cocoon.xconf for example. Where is the cocoon.xconf in 2.2? Where can I define my datasources? Where can I get the code of the sample? Johannes Derek Hohls schrieb: > Johannes > > Good question! The "official and best" way is to use Hibernate and > Spring; > this will, IMO, mean writing *lots* of code. You can use flowscript > instead, > for simple cases, but be warned that many here will point out the > potential > flaws in this approach. > > In the 2.1.x series of Cocoon, there was a sample that showed this > approach: > eg. see > http://cocoon.jsp ( http://cocoon.jsp/ )-servlet.net/samples/blocks/forms/ > and look for "Database access". > > I am not sure if you will be able to replicate this in 2.2? > > Derek > > >>> On 2008/06/06 at 10:05, in message <4848EFB2.4090109@... > <mailto:4848EFB2.4090109@...>>, Johannes Hoechstaedter > <j.hoechstaedter@... <mailto:j.hoechstaedter@...>> wrote: > Good morning Bng, > > I know, cocoon is based on spring. But isn't there another possibility > with cocoon blocks only? There is this database-block. What it is good > for, when I have to write my own spring application? I want to write as > less code as possible. > > Johannes > > > Johannes -- you may want to search for tutorials on using databases with > > Spring. My understanding is that with Cocoon 2.2 it is best to have > > Spring configure and manage any database connections. Then you can add > > Cocoon features (eg, the SQL transformer or whatever) once that is set > > up. > > > > Bng > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > <mailto:users-unsubscribe@...> > For additional commands, e-mail: users-help@... > <mailto:users-help@...> > > -- > This message is subject to the CSIR's copyright terms and conditions, > e-mail legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > > This message has been scanned for viruses and dangerous content by > *MailScanner* <http://www.mailscanner.info/>, > and is believed to be clean. MailScanner thanks Transtec Computers > <http://www.transtec.co.uk/> for their support. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Database connection by cocoon 2.2Inside your cocoon 2 block:
1) inside src/main/resources/META-INF/cocoon/avalon/custom-sitemap-compents.xconf put: <map:components> ..... <map:transformers> <map:transformer logger="sitemap.transformer.sql" name="sql" src="org.apache.cocoon.transformation.SQLTransformer"/> .... </map:transformers> </map:components> 2) in the block pom.xml: <dependency> <groupId>org.apache.cocoon</groupId> <artifactId>cocoon-databases-impl</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>oracle</groupId> <artifactId>oracle-jdbc</artifactId> <version>10.2.0.4</version> </dependency> 3) inside src/main/resources/META-INF/cocoon/spring/datasources.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean name="org.apache.avalon.excalibur.datasource.DataSourceComponent/lastmod " class="org.apache.cocoon.databases.bridge.spring.avalon.SpringToAvalonDa taSourceWrapper"> <property name="wrappedBean"> <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource" > <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@cmcdev2007:1521:cmccis"/> <property name="username" value="xxxx"/> <property name="password" value="xxxxx"/> </bean> </property> </bean> </beans> 4) inside src/main/resources/COB-INF/sitemap.xmap: <map:match pattern="runsql/*"> <map:generate src="sql/sql.xml"/> <map:transform type="sql"> <map:parameter name="use-connection" value="lastmod"/> <map:parameter name="show-nr-of-rows" value="true"/> <map:parameter name="clob-encoding" value="UTF-8"/> <map:parameter name="date" value="{1}"/> </map:transform> <map:serialize type="xml"/> </map:match> 5) inside src/main/resources/COB-INF/sql/sql.xml: <?xml version="1.0" encoding="UTF-8"?> <page> <title>Hello</title> <content> <para>The following concepts were modified since:</para> <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0"> <sql:query name="lastmod"> SELECT * FROM DALCONCEPT_LASTMOD WHERE LASTMODIFIED >= TO_DATE('<sql:substitute-value sql:name="date"/>','YYYYMMDD') </sql:query> </sql:execute-query> </content> </page> I agree with the others though.... Hibernate + Spring should be used for any production type app, for a quick mock up, the above should work without having to go near Spring + Hibernate. /dom -----Original Message----- From: Derek Hohls [mailto:DHohls@...] Sent: 06 June 2008 13:25 To: users@... Subject: Re: Database connection by cocoon 2.2 Johannes Just curious - is there a pressing reason to use 2.2? Why not download and work with 2.1 (which ships with the sample code you requested). Again, IMO, 2.2 still needs more work - esp. docs and simple examples - in making it accessible to the "average" user. Cheers Derek >>> On 2008/06/06 at 01:37, in message <48492181.2080406@...>, Johannes Hoechstaedter <j.hoechstaedter@...> wrote: The linked sample is nice, and basically exactly what I am looking for. I have already searched on http://cocoon.apache.org/2.1/ on how I can etablish a database connection. You need an entry int your web.xml and in your cocoon.xconf for example. Where is the cocoon.xconf in 2.2? Where can I define my datasources? Where can I get the code of the sample? Johannes Derek Hohls schrieb: > Johannes > > Good question! The "official and best" way is to use Hibernate and > Spring; this will, IMO, mean writing *lots* of code. You can use > flowscript instead, for simple cases, but be warned that many here > will point out the potential flaws in this approach. > > In the 2.1.x series of Cocoon, there was a sample that showed this > approach: > eg. see > http://cocoon.jsp ( http://cocoon.jsp/ > )-servlet.net/samples/blocks/forms/ > and look for "Database access". > > I am not sure if you will be able to replicate this in 2.2? > > Derek > > >>> On 2008/06/06 at 10:05, in message <4848EFB2.4090109@... > <mailto:4848EFB2.4090109@...>>, Johannes Hoechstaedter > <j.hoechstaedter@... <mailto:j.hoechstaedter@...>> > Good morning Bng, > > I know, cocoon is based on spring. But isn't there another possibility > with cocoon blocks only? There is this database-block. What it is good > for, when I have to write my own spring application? I want to write > as less code as possible. > > Johannes > > > Johannes -- you may want to search for tutorials on using databases > > with Spring. My understanding is that with Cocoon 2.2 it is best to > > have Spring configure and manage any database connections. Then you > > can add Cocoon features (eg, the SQL transformer or whatever) once > > that is set up. > > > > Bng > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > <mailto:users-unsubscribe@...> > For additional commands, e-mail: users-help@... > <mailto:users-help@...> > > -- > This message is subject to the CSIR's copyright terms and conditions, > e-mail legal notice, and implemented Open Document Format (ODF) > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > > This message has been scanned for viruses and dangerous content by > *MailScanner* <http://www.mailscanner.info/>, and is believed to be > clean. MailScanner thanks Transtec Computers > <http://www.transtec.co.uk/> for their support. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... 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@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2Hi Dominic
I tried, but I failed :). I didn't foun the file src/main/resources/META-INF/cocoon/avalon/custom-sitemap-compents.xconf 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@... For additional commands, e-mail: users-help@... |
|
|
Re: Database connection by cocoon 2.2ok, 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.xconf > 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@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Database connection by cocoon 2.2Cool 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@...] Sent: 06 June 2008 16:06 To: users@... 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@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... 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@... For additional commands, e-mail: users-help@... |