cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: difficulty w/URI parameters in an ESQL-using document
Date Mon, 12 Feb 2001 23:47:15 GMT
On Mon, 12 Feb 2001, Rick Wayne wrote:

> hi all,
>
> i have a problem with esql and URI parameters.  i'm trying to do a pretty
> simple data download, where a user picks weather params (e.g., max air
> temp)
> from a form, which then calls an XML doc with esql in it.  the URI looks
> something like:
>
>   ...getData.xml?data_table=t_411&data_field=theDate&data_field=DMxTAir...
>
> my problem is that i can't seem to get any of the params passed in the URI
> to esql.  i tried using <xsp:logic> and request.getParameter() to build up
> an sql query string, but when i passed it into my esql doc, i get bupkis
> back.  likewise if i try with <request:get-parameter>.
>
> i should note that i also pass the query string out so that the stylesheet
> can print it; it looks fine.  if i take the same string and wire it into
> the XML source for the query, it works fine.  but if i build a StringBuffer
> called query in code, then embed it in the esql stuff...nada.

but if you do this:

<esql:query><xsp:expr>query.toString()</xsp:expr></esql:query>

i bet you'll find success. i personally generally recommend that you build
the query using esql:parameter's, but i don't think that you can
substitute the table name as a variable in a prepared statement.

- donald


Mime
View raw message