Is your site map set up correctly? I.e., you can treat an xsp page as an XML
document and then apply esql.xsl (the logicsheet) as a regular XSL
stylesheet. The result is that you will get ESQL code embedded in the xsp
page which sounds like what is happening. Make sure that you have the
correct type set for your map:generate (type="serverpages"). The esql.xsl
should *not* be present in a map:transform. I.e., this works for me:

   <map:match pattern="ktest/testquery">
    <map:generate type="serverpages" src="c2-test/sql-code/testquery.xsp"/>
    <map:transform src="stylesheets/simple-samples2html.xsl">
        <map:parameter name="view-source" value="c2-test/{1}.xsp"/>
    </map:transform>
    <map:serialize/>
   </map:match>



Karl Hallowell                 [EMAIL PROTECTED]

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 05, 2001 10:14 AM
> To: [EMAIL PROTECTED]
> Subject: again mySQL, jdbc and ESQL
> 
> 
> >The XSP uri you are using is old. The new URI is
> >http://apache.org/xsp
> >Try
> ><xsp:page
> >       language="java"
> >        xmlns:xsp="http://apache.org/xsp";
> >        xmlns:esql="http://apache.org/cocoon/SQL/v2";
> >
> >Marco
> >
> 
> Thank you Marco, but I continue to receive
> ESQL code directly in HTML file.
> I'm very stuck!
> Another idea?
> 
> Regards, ciao
> Francesco
> 
> >
> >----- Original Message -----
> >From: <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Wednesday, July 04, 2001 7:51 PM
> >Subject: mySQL, jdbc and ESQL
> >
> >
> >> Hi,
> >> I'm trying to setup a pooled connection for mySQL.
> >>
> >> My packets: JDK 1.3.1, Tomcat 4 beta5, Cocoon 2 beta1, 
> mySQL 3.23.38,
> >> mm.mysql 2.0.6.1 on Linux Red Hat 6.2.
> >>
> >> I've created a db named "test" with user "fku"
> >> and table "utenti".
> >> Then I've added these lines to cocoon.xconf
> >> ------
> >> <datasources>
> >>     <jdbc name="personnel">
> >>       <pool-controller min="5" max="10"/>
> >>       <dburl>jdbc:mysql://localhost/test</dburl>
> >>       <user>fku</user>
> >>       <password></password>
> >>     </jdbc>
> >>   </datasources>
> >> ------
> >>
> >> ------
> >> <init-param>
> >>       <param-name>load-class</param-name>
> >>       <param-value>
> >>       org.gjt.mm.mysql.Driver
> >>       </param-value>
> >> </init-param>
> >> ------
> >>
> >> I've put mm.mysql-2.0.6.1.jar in TOMCAT_HOME/lib and 
> CLASSPATH contains
> the
> >> path to mm.mysql's dir /opt/mm.mysql-2.0.6.1.
> >>
> >> This is my XML code:
> >> ------
> >> <xsp:page
> >>         laguage="java"
> >>         xmlns:xsp="http://www.apache.org/1999/XSP/Core";
> >>         xmlns:esql="http://apache.org/cocoon/SQL/v2";
> >> >
> >> ...
> >> <esql:connection>
> >> <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> >>         <esql:dburl>jdbc:mysql://localhost/test</esql:dburl>
> >>         <esql:username>fku</esql:username>
> >>         <esql:password></esql:password>
> >>         <esql:execute-query>
> >>                 <esql:query>select * from prova</esql:query>
> >>
> >>                 <esql:results>
> >>                         <ROWSET>
> >>                          <esql:row-results>
> >>                           <ROW>
> >>                            <esql:get-columns/>
> >>                           </ROW>
> >>                          </esql:row-results>
> >>                         </ROWSET>
> >>                 </esql:results>
> >>
> >> </esql:connection>
> >> ------
> >>
> >> Please, see the mySQL's localhost.log:
> >> ------
> >> /opt/mysql/libexec/mysqld, Version: 3.23.38-log, started with:
> >> Tcp port: 3306  Unix socket: /tmp/mysql.sock
> >> Time                 Id Command    Argument
> >> 010703 15:35:08       1 Connect     fku@localhost as anonymous on
> >>                       1 Init DB     test
> >> 010703 15:35:16       1 Query       SHOW VARIABLES
> >> 010703 15:35:42       2 Connect     fku@localhost as anonymous on
> >>                       2 Init DB     test
> >>                       2 Query       SHOW VARIABLES
> >>                       3 Connect     fku@localhost as anonymous on
> >>                       3 Init DB     test
> >>                       3 Query       SHOW VARIABLES
> >> 010703 15:35:43       4 Connect     fku@localhost as anonymous on
> >>                       4 Query       SHOW VARIABLES
> >> 010703 15:35:44       5 Connect     fku@localhost as anonymous on
> >>                       5 Init DB     test
> >>                       5 Query       SHOW VARIABLES
> >> ------
> >>
> >> And, finally, cocoon.log:
> >> ------
> >> ...
> >> 2001-07-03 15:28:52 DEBUG   1539    [cocoon  ] 
> (HttpProcessor[8080][4]):
> >> Trying
> >> to load class: org.gjt.mm.mysql.Driver
> >> ...
> >> 2001-07-03 15:35:42 DEBUG   41112   [cocoon  ] (Thread-7): 
> JdbcConnection
> object created
> >>
> >> 2001-07-03 15:35:42 DEBUG   41155   [cocoon  ] (Thread-7): 
> JdbcConnection
> object created
> >>
> >> 2001-07-03 15:35:43 DEBUG   41206   [cocoon  ] (Thread-7): 
> JdbcConnection
> object created
> >>
> >> 2001-07-03 15:35:44 DEBUG   41311   [cocoon  ] (Thread-7): 
> JdbcConnection
> object created
> >>
> >> 2001-07-03 15:35:45 DEBUG   41396   [cocoon  ] (Thread-7): 
> JdbcConnection
> object created
> >> ...
> >> ------
> >>
> >> But I receive ESQL code in final HTML directly, without any query
> >> execution, so my HTML document contains these lines:
> >> ------
> >> org.gjt.mm.mysql.Driver jdbc:mysql://localhost/test fku
> >> select * from prova
> >> ------
> >>
> >> It seems that the pooled connection is established, but ESQL code
> >> isn't recognized by C2.
> >>
> >> I've missed anything?
> >> Any idea?
> >>
> 
> 
> Francesco Casalena
> L.U.G. "Il Pinguino"
> ----------------------------------------------
> Virgilio Mail - Il tuo indirizzo E-mail gratis
> http://mail.virgilio.it
> 
> 
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to