cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject RE:Passing parameters to an xml file to get a select from a DB
Date Mon, 05 Feb 2001 18:12:35 GMT
On Mon, 5 Feb 2001, Ivan wrote:

> I made another example, based in previous one, with the changes you
> recommend me. By the way, I'm using Cocoon 1.8 instead of 1.8.2
> (sorry not to say this before ....), I supose not to erase this line:
>
> <?xml-logicsheet href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
>
> My whole new XML looks like this entirely :
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-format type="text/xml"?>
> <?xml-logicsheet href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
> <xsp:page language="java" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:request="http://www.apache.org/1999/XSP/Request">
> <valors>
> <xsp:logic>
> String emp1 = request.getParameter("emp1");
> String emp2 = request.getParameter("emp2");
> </xsp:logic>
> <esql:execute-query>
> <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> <esql:dburl>jdbc:mysql://fastdb/finanzas</esql:dburl>
> <esql:username/>
> <esql:password/>
> <esql:query>
> select * from ibex35_ahora where name&gt;= <esql:parameter><request:get-parameter
name="emp1"/></esql:parameter>
> and name&lt;= <esql:parameter><request:get-parameter name="emp2"/></esql:parameter>
> </esql:query>
> <esql:results>
> <name>
> <esql:get-string column="name"/>
> </name>
> <siglas>
> <esql:get-string column="siglas"/>
> </siglas>
> </esql:results>
> </esql:execute-query>
> </valors>
> </xsp:page>

your schema is incorrect. compare what you have to the sample in
samples/sql/esql.xml.

- donald


Mime
View raw message