You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Rajesh.Arra" <ra...@enlume.com> on 2005/02/24 14:04:24 UTC

Accessing the database

Hi,
 
Where I have to write code (below) for accessing the data from database.
I configured web.xml, cocoon.xconf, sitemap.xmap for mysql server
 
 
<page>
   <title>Hello</title>
   <content>
    <para>This is my first Cocoon page filled with sql data!</para>
    <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> 
     <query name="department">
          select id,name from department_table 
     </query>
    </execute-query>
   </content>
  </page>
 
please help me
----
Thanks and Best Regards,
Rajesh.Arra
            Software Engineer
Enlume Technologies Private Limited
4-246 Geetanagar,Malkajgiri, 
Hyderabad.A.P - 500047 
INDIA 
Tel: 91-40-27052705
 

AW: Accessing the database

Posted by José Ferreiro - TSSAG <jo...@tssag.com>.
Hi Rajesh
 
for more information about mysql look here:
http://wiki.apache.org/cocoon/MySQL
 
I suggest you also to take a look on this page
 
http://cocoon.apache.org/2.1/userdocs/xsp/esql.html#Configuration
 
I think it is easier to connect to your DB.
 
Otherwise investigate the samples given in cocoon 2.1.6
 
http://localhost:8888/samples/blocks/databases/samples
 
and the source code is here in this path (obviouly if depending where
you install it!) 
C:\Program Files\Apache
Group\cocoon-2.1.6\build\webapp\samples\blocks\databases
 
Hope this will give you a way to start.
 
Good luck
 
   /JF
 
-----Ursprüngliche Nachricht-----
Von: Rajesh.Arra [mailto:rajesha@enlume.com] 
Gesendet: Donnerstag, 24. Februar 2005 14:04
An: users@cocoon.apache.org
Betreff: Accessing the database
 
Hi,
 
Where I have to write code (below) for accessing the data from database.
I configured web.xml, cocoon.xconf, sitemap.xmap for mysql server
 
 
<page>
   <title>Hello</title>
   <content>
    <para>This is my first Cocoon page filled with sql data!</para>
    <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> 
     <query name="department">
          select id,name from department_table 
     </query>
    </execute-query>
   </content>
  </page>
 
please help me
----
Thanks and Best Regards,
Rajesh.Arra
            Software Engineer
Enlume Technologies Private Limited
4-246 Geetanagar,Malkajgiri, 
Hyderabad.A.P - 500047 
INDIA 
Tel: 91-40-27052705