Here is an example of what I did.
This works inside a "xsp:logic" tag... In your case, you may use xsp:logic
instead of xsp:expr

* using a variable (_ensemble) :
<xsp:logic>
if (<session:get-attribute name="counter"/> != null) {
  [some code here]
...
  <esql:query>
        select i.idtitle, t.xml
        from <xsp:expr>_ensemble</xsp:expr> identifiant i, title t
        where i.idtitle = t.idtitle <xsp:expr>_whichGroup + _like</xsp:expr>
  </esql:query>
</xsp:logic>

* using a taglib: this is the same thing, because taglib elements are
expanded to *java code*
just replace _ensemble above with <request:get-parameter name="Alex"/>

Olivier

> -----Message d'origine-----
> De : Arnaud Bienvenu [mailto:[EMAIL PROTECTED]]
> Envoyé : jeudi 19 juillet 2001 15:21
> À : [EMAIL PROTECTED]
> Objet : esql:query + esql:parameter bug
> 
> 
> If I write, for example :
> <esql:query>
>  select * from space where person like <esql:parameter 
> type="string">Alex</esql:parameter>
>  ...
> (I known I don't need the esql:parameter tags here, but see below...)
> 
> Then I get an error :
> Error compiling index_xsp: Line 303, column 37: ')' expected.
> 
> Actually, the generated code is :
> try {
>   _esql_query.prepared_statement.setString(1,
>      this.characters("Alex"););
> }
> 
> which is obviously incorrect. The generated code gets more 
> broken if you use
> something like
> <esql:parameter><request:get-parameter name="Alex"/></esql:parameter>
> 
> I think this is a big problem, and if some developer manage 
> to fix it, he
> would be a real man (or woman)...
> 
> -- 
> Arnaud Bienvenu
> http://www.generasound.com/
> 
> ---------------------------------------------------------------------
> 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