You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gustavo Mejia <gm...@infotec.com.mx> on 2001/06/13 16:16:22 UTC
Problem with my query
Hi,
I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
see any result
My code here :
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
language="java"
xmlns:esql="http://www.apache.org/1999/SQL/v2"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:request="http://www.apache.org/1999/XSP/Request"
>
<page title="SQL Search Results">
<esql:execute-query>
<esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
<esql:dburl>jdbc:oracle:thin:@MyIP:MyPort:cta</esql:dburl>
<esql:username>userID</esql:username>
<esql:password>Password</esql:password>
<esql:doc-element>empleados</esql:doc-element>
<esql:row-element>registro</esql:row-element>
<esql:query>select * from employee
</esql:query>
</esql:execute-query>
</page>
</xsp:page>
What I got is:
oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
Password empleados registro select * from employee
Could you help me ??
Thanks
Gustavo
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Problem with my query
Posted by Sergio Carvalho <se...@acm.org>.
On Wed, 13 Jun 2001 10:07:07 -0500
Gustavo Mejia <gm...@infotec.com.mx> wrote:
> And now It works, but now what I wanto to do i to make variable the criteria of
> my query, yes, something like
>
> <esql:query>select * from employee where empno=MY_VARIABLE</esql:query>
>
> Do you know how can I do that ?
See my post on the thread with subject "How to pass sitemap parameters to XSP". It should place you on the right track.
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Problem with my query
Posted by Gustavo Mejia <gm...@infotec.com.mx>.
Thanks,
I chanche my code to:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<page>
<esql:connection>
<esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
<esql:dburl>jdbc:oracle:thin:@MyIP:MyPort:cta</esql:dburl>
<esql:username>UserID</esql:username>
<esql:password>Password</esql:password>
<esql:execute-query>
<esql:query>select * from employee</esql:query>
<esql:results>
<header>header info</header>
<esql:row-results>
<empleado>
<empno><esql:get-string column="empno"/></empno>
<lastname><esql:get-string column="lastname"/></lastname>
</empleado >
</esql:row-results>
<footer>footer info</footer>
</esql:results>
</esql:execute-query>
</esql:connection>
</page>
</xsp:page>
And now It works, but now what I wanto to do i to make variable the criteria of
my query, yes, something like
<esql:query>select * from employee where empno=MY_VARIABLE</esql:query>
Do you know how can I do that ?
Thanks a lot !!
Gustavo
Luca Morandini wrote:
> Gustavo,
>
> have you already added something like this in cocoon.xconf (under the
> datasources tag) ?
>
> <jdbc name="oracle">
> <pool-controller min="5" max="10" oradb="true"/>
> <dburl>jdbc:oracle:thin:@localhost:1521:ORA81</dburl>
> <user>login</user>
> <password>password</password>
> </jdbc>
>
> Remember to re-start Tomcat afterwards any change to cocoon.xconf !
>
> Best regards,
>
> ---------------------------------------------
> Luca Morandini
> GIS Consultant
> lmorandini@ieee.org
> +39 (0)744 59 85 1 Office
> +39 0335 681 02 12 Mobile
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
>
> > -----Original Message-----
> > From: Gustavo Mejia [mailto:gmejia@infotec.com.mx]
> > Sent: mercoledì 13 giugno 2001 16.16
> > To: cocoon-users@xml.apache.org
> > Subject: Problem with my query
> > Importance: High
> >
> >
> > Hi,
> >
> >
> > I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
> > see any result
> >
> > My code here :
> >
> > <?xml version="1.0"?>
> > <?cocoon-process type="xsp"?>
> >
> > <xsp:page
> > language="java"
> > xmlns:esql="http://www.apache.org/1999/SQL/v2"
> > xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> > xmlns:request="http://www.apache.org/1999/XSP/Request"
> > >
> > <page title="SQL Search Results">
> > <esql:execute-query>
> > <esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
> > <esql:dburl>jdbc:oracle:thin:@MyIP:MyPort:cta</esql:dburl>
> > <esql:username>userID</esql:username>
> > <esql:password>Password</esql:password>
> >
> > <esql:doc-element>empleados</esql:doc-element>
> > <esql:row-element>registro</esql:row-element>
> >
> > <esql:query>select * from employee
> > </esql:query>
> > </esql:execute-query>
> > </page>
> > </xsp:page>
> >
> > What I got is:
> >
> > oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
> > Password empleados registro select * from employee
> >
> > Could you help me ??
> >
> > Thanks
> >
> > Gustavo
> >
> >
> > ---------------------------------------------------------------------
> > 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: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Problem with my query
Posted by Luca Morandini <l....@tin.it>.
Gustavo,
have you already added something like this in cocoon.xconf (under the
datasources tag) ?
<jdbc name="oracle">
<pool-controller min="5" max="10" oradb="true"/>
<dburl>jdbc:oracle:thin:@localhost:1521:ORA81</dburl>
<user>login</user>
<password>password</password>
</jdbc>
Remember to re-start Tomcat afterwards any change to cocoon.xconf !
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
+39 (0)744 59 85 1 Office
+39 0335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Gustavo Mejia [mailto:gmejia@infotec.com.mx]
> Sent: mercoledì 13 giugno 2001 16.16
> To: cocoon-users@xml.apache.org
> Subject: Problem with my query
> Importance: High
>
>
> Hi,
>
>
> I am using Cocoon 1.8.2, and I am trying to run this query, but I don't
> see any result
>
> My code here :
>
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
>
> <xsp:page
> language="java"
> xmlns:esql="http://www.apache.org/1999/SQL/v2"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:request="http://www.apache.org/1999/XSP/Request"
> >
> <page title="SQL Search Results">
> <esql:execute-query>
> <esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
> <esql:dburl>jdbc:oracle:thin:@MyIP:MyPort:cta</esql:dburl>
> <esql:username>userID</esql:username>
> <esql:password>Password</esql:password>
>
> <esql:doc-element>empleados</esql:doc-element>
> <esql:row-element>registro</esql:row-element>
>
> <esql:query>select * from employee
> </esql:query>
> </esql:execute-query>
> </page>
> </xsp:page>
>
> What I got is:
>
> oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@MyIP:MyPort:cta userID
> Password empleados registro select * from employee
>
> Could you help me ??
>
> Thanks
>
> Gustavo
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>