cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric ..." <ry...@hotmail.com>
Subject C2 and Postgres
Date Wed, 11 Jul 2001 17:25:13 GMT
<html><DIV>Can you tell me how to configure the database driver in Cocoon2 in order
to&nbsp;connect to my postgres database named "dtw". The following first XSP code is working
perfectly well under Cocoon1 :</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;?xml version="1.0"?&gt;</DIV>
<DIV>&lt;?cocoon-process type="xsp"?&gt;</DIV>
<DIV><BR>&lt;?xml-stylesheet type="text/xsl" href="step1.xsl"?&gt;<BR>&lt;?cocoon-process
type="xslt"?&gt;</DIV>
<DIV>&lt;xsp:page language="java"<BR>&nbsp; xmlns:xsp="<A href="http://www.apache.org/1999/XSP/Core">http://www.apache.org/1999/XSP/Core</A>"<BR>&nbsp;
xmlns:esql="<A href="http://apache.org/cocoon/SQL/v2">http://apache.org/cocoon/SQL/v2</A>"<BR>&gt;</DIV>
<DIV>&lt;page&gt;</DIV>
<DIV>&lt;!-- Recuperation of the member's image paths corresponding to one of his
websites<BR>&nbsp; so that we put into the svg the link of the images that have
already been stored in the database --&gt;</DIV>
<DIV><BR>&lt;esql:connection&gt;</DIV>
<DIV>&nbsp;&lt;esql:driver&gt;org.postgresql.Driver&lt;/esql:driver&gt;<BR>&nbsp;&lt;esql:dburl&gt;jdbc:postgresql://localhost:5432/dtw&lt;/esql:dburl&gt;<BR>&nbsp;&lt;esql:username&gt;postgres&lt;/esql:username&gt;<BR>&nbsp;&lt;esql:password&gt;&lt;/esql:password&gt;</DIV>
<DIV><BR>&nbsp; &lt;esql:execute-query&gt;<BR>&nbsp;<BR>&nbsp;&lt;esql:query&gt;<BR>&nbsp;
&nbsp;&nbsp;SELECT url_name,urlextension_name,url_path,imagepath_relativepath,imagepath_filename,fileextension_name
FROM url,urlextension,imagepath,fileextension WHERE (url.url_id = '1' AND urlextension_name='com')&nbsp;
;<BR>&nbsp;&lt;/esql:query&gt;<BR>&nbsp;<BR>&nbsp;&lt;esql:results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; &lt;esql:row-results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&lt;images&gt;<BR>&nbsp;&nbsp; &nbsp;&nbsp;&lt;url_name&gt;&lt;esql:get-string
column="url_name"/&gt;&lt;/url_name&gt;<BR>&nbsp;&nbsp;&lt;urlextension_name&gt;&lt;esql:get-string
column="urlextension_name"/&gt;&lt;/urlextension_name&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<BR>&nbsp;&nbsp;&lt;url_path&gt;&lt;esql:get-string
column="url_path"/&gt;&lt;/url_path&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&lt;imagepath_relativepath&gt;&lt;esql:get-string column="imagepath_relativepath"/&gt;&lt;/imagepath_relativepath&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&lt;imagepath_filename&gt;&lt;esql:get-string column="imagepath_filename"/&gt;&lt;/imagepath_filename&gt;<BR>&nbsp;&nbsp;&lt;fileextension_name&gt;&lt;esql:get-string
column="fileextension_name"/&gt;&lt;/fileextension_name&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&lt;/images&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; &lt;/esql:row-results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/esql:results&gt;</DIV>
<DIV>&nbsp; &lt;/esql:execute-query&gt;</DIV>
<DIV>&lt;/esql:connection&gt;</DIV>
<DIV>&lt;rastermap_path&gt;c:\plan.gif&lt;/rastermap_path&gt;</DIV>
<DIV>&lt;/page&gt;</DIV>
<DIV>&lt;/xsp:page&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>The following code failed under Cocoon2 :</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;?xml version="1.0"?&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;xsp:page language="java"<BR>&nbsp; xmlns:xsp="<A href="http://apache.org/xsp">http://apache.org/xsp</A>"<BR>&nbsp;
xmlns:esql="<A href="http://apache.org/cocoon/SQL/v2">http://apache.org/cocoon/SQL/v2</A>"<BR>&gt;</DIV>
<DIV>&lt;page&gt;</DIV>
<DIV><BR>&lt;esql:connection&gt;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; &lt;esql:driver&gt;org.postgresql.Driver&lt;/esql:driver&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
&lt;esql:dburl&gt;jdbc:postgresql://localhost:5432/dtw&lt;/esql:dburl&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
&lt;esql:username&gt;postgres&lt;/esql:username&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
&lt;esql:password&gt;&lt;/esql:password&gt;</DIV>
<DIV><BR>&nbsp; &lt;esql:execute-query&gt;<BR>&nbsp;<BR>&nbsp;&lt;esql:query&gt;<BR>&nbsp;
&nbsp;&nbsp;SELECT enduser_id, enduser_lastname, enduser_firstname FROM enduser;<BR>&nbsp;&lt;/esql:query&gt;<BR>&nbsp;<BR>&nbsp;&lt;esql:results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; &lt;esql:row-results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&lt;enduser&gt;<BR>&nbsp;&nbsp; &nbsp;&nbsp;&lt;enduser_id&gt;&lt;esql:get-string
column="enduser_id"/&gt;&lt;/enduser_id&gt;<BR>&nbsp;&nbsp;&lt;enduser_lastname&gt;&lt;esql:get-string
column="enduser_lastname"/&gt;&lt;/enduser_lastname&gt;<BR>&nbsp;&nbsp;&lt;enduser_firstname&gt;&lt;esql:get-string
column="enduser_firstname"/&gt;&lt;/enduser_firstname&gt;<BR>&nbsp;&nbsp;&lt;/enduser&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; &lt;/esql:row-results&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/esql:results&gt;</DIV>
<DIV>&nbsp; &lt;/esql:execute-query&gt;</DIV>
<DIV>&lt;/esql:connection&gt;</DIV>
<DIV>&lt;/page&gt;</DIV>
<DIV>&lt;/xsp:page&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Could you please tell me what's wrong, and what files do i need to change (cocoon.xconf
...).</DIV>
<DIV>Thanks.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Eric Vernichon</DIV><br clear=all><hr>Get Your Private, Free
E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></html>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message