Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 27907 invoked by uid 500); 31 Jul 2001 11:30:10 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 27894 invoked from network); 31 Jul 2001 11:30:09 -0000 Message-ID: <676EE3B80913D5118D21003048216B760EF894@exchdubl.Berger-Levrault.fr> From: JEULIN Olivier To: "'cocoon-users@xml.apache.org'" Subject: RE: Connecting database and XML pages Date: Tue, 31 Jul 2001 13:26:16 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N As usual here, you forgot to tell which version of cocoon you're = using... Here is an (short!) example of what you can do with C1.8.2 (it may = slightly differ with C2): [...] foo =20 select b.ref as ref b.quantite as nb from basket b where b.id =3D =09 [more ...] You can retrieve different kind of data, even XML (read the doc, and esql.xsd in the samples/sql directory) ########################################################## You can connect directly to the DB (with user ID & pwd) or, much = better, using a connection pool. Here is mine (from cocoon.properties), using a DB named foo: # Turbine DB Connection Pool ############################ # These are your database settings, look in the # org.apache.turbine.util.db.pool.* package for more information. processor.xsp.pool.database.foo.driver=3Dorg.gjt.mm.mysql.Driver processor.xsp.pool.database.foo.url=3Djdbc:mysql://your.mysql.server/foo= processor.xsp.pool.database.foo.username=3Dfoouser processor.xsp.pool.database.foo.password=3Dfoopwd processor.xsp.pool.database.foo.maxConnections=3D5 processor.xsp.pool.database.foo.expiryTime=3D3600000 [...] # These are the supported jdbc-drivers and their adaptors. # These properties are used by the DBFactory. processor.xsp.pool.database.adaptor=3DDBMM processor.xsp.pool.database.adaptor.DBMM=3Dorg.gjt.mm.mysql.Driver You will need the JDBC adaptater for mysql (see the official mysql = site, sun's JDBC section, or search the list's archives about it) HTH, Olivier > -----Message d'origine----- > De : annemarie.hartvigsen@telenor.com > [mailto:annemarie.hartvigsen@telenor.com] > Envoy=E9 : mardi 31 juillet 2001 09:08 > =C0 : cocoon-users@xml.apache.org > Objet : Connecting database and XML pages >=20 >=20 > Hi, >=20 > I have a mySQL database. I also have a web server:=20 > Apache-Tomcat-Cocoon. I > want to make web pages written in XML, transformed to HTML or=20 > WML by the > help of Cocoon. These pages will serve as an interface to the=20 > database. >=20 > What is the best way to connect the database with the XML=20 > pages? My users > should be able to read and write in the database. >=20 > Any tips, suggestions, experiences and examples are greatly=20 > appreciated! >=20 > /Anne Marie --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: