cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Watson" <>
Subject RE: Cocoon 2 + Access
Date Thu, 16 May 2002 09:05:38 GMT

If you MUST use access (I do while testing !) ...

looking at your example ...

<xsp:page language="java"

you've got an extra > after the xmlns:xsp=""
it should be


Don't expect to see much until you do something like the following.
I wouldn't know how to use column numbers with esql; I always use names

<?xml version="1.0" encoding="iso-8859-1"?>


      select userid, sessionid, visitdate, referrer, page from visit


	 <userid><esql:get-string column = "userid"/></userid>
	 <sessionid><esql:get-string column = "sessionid"/></sessionid>
	 <visitdate><esql:get-string column = "visitdate"/></visitdate>
	 <referrer><esql:get-string column = "referrer"/></referrer>
	 <page><esql:get-string column = "page"/></page>




BUT I agree with others, you're probably safer using MySQL. It's free too!
There's even an ODBC driver for it, so you could set an ODNC datasource and
look at it through access.

-----Original Message-----
From: cyril vidal []
Sent: 16 May 2002 00:20
Subject: Re: Cocoon 2 + Access

Hi Perry,

I've tried with // instead  of / ,it isn't better...
Anyway, I've configurated with esql and pool.
the cocoon.xconf looks like this:
<jdbc name="pool">
<pool-controller min="5" max="10"/>
<dburl>jdbc:odbc:logs</dburl>  (with odbc, we don't need to write the
complete url, right??)
and I didn't forget to load the driver in web.xml...

My file base1.xsp is this one, as simple as possible, just to test the
<?xml version="1.0" encoding="iso-8859-1"?>
<xsp:page language="java"


To my great surprise, when I execute this file, I obtain:
<doc xmlns:xsp="">



I think, it's not normal...I should not see the connection element...  I
think I have to change the line <dburl>jdbc:odbc:logs</dburl> but I don't
know really how to do...

----- Original Message -----
From: Faulkner, Perry
To: ''
Sent: Thursday, May 16, 2002 12:47 AM
Subject: RE: Cocoon 2 + Access

Hi Cyril,

In theory it should work, as it's just some Java code, similar to that
produced by ESQL. The disadvantage, is that you don't have any error
checking or logging to fall back on when situations like this occur, and
ESQL would provide that.

Anyway, the only obvious thing that I can see, is to put \\'s in your
connection string, e.g:


Also turn on ODBC tracing and see if any other information is logged, to
help you resolve the problem.


-----Original Message-----
From: cyril vidal []
Sent: Thursday, 16 May 2002 8:18
Subject: Cocoon 2 + Access


I would like to know  if it is an obligation to use ESQL and the connection
pool provided by Cocoon2 to connect to a database.
By example, isn't it possible just to write the following code, by which a
simply connection should be executed with the 'logs' database?
I've tried it and it doesn't work but I don't know if there's an error on
the code or if anyway, it could never run.
Some of you can help me, please?
Thanks in advance,

<?xml version="1.0" encoding="iso-8859-1"?>
<xsp:page language="java"


<Promotion auteur="Jules">

Connection conn =
Statement stmt = conn.createStatement();
ResultSet resultat = stmt.executeQuery("select * from visit where

<Description>Nous proposons une réduction de 25%, restreinte à la période de
Septembre 20001 à OCtobre 20001</Description>

<userid><xsp:expr>resultat.getString (1)</xsp:expr></userid>
<sessionid><xsp:expr>resultat.getString (2)</xsp:expr></sessionid>
<visitdate><xsp:expr>resultat.getString (3)</xsp:expr></visitdate>
<referrer><xsp:expr>resultat.getString (4)</xsp:expr></referrer>
<page><xsp:expr>resultat.getString (5)</xsp:expr></page>


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message