Did you already look at the generated java source?
([work-dir]/cocoon-files/org/apache/www/[projek-dirs]/ comp_rech_xsp.java)
/leo


On Freitag, Juni 20, 2003, at 12:14 Uhr, ntic wrote:

Hello,
I have some little trouble with this XSP script :
The aims of this one is to get some POST variables, to build a query, compute it and show the result with XSLT stylesheet.
I use cocoon 2.0.4
j2sdk1.4.1_02


But cocoon says that to me :

org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling comp_rech_xsp:
Line 272, column 8: illegal start of type
Line 377, column 58: method valueOf() not found in class java.lang.String
Line 0, column 0: 2 errors


The script :
<?xml version="1.0" encoding="iso-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp"; xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:xsl="http://www.w3c.org/1999/XSL/Transform";>
<xsp:structure>
<xsp:include>java.net.*</xsp:include>
<xsp:include>java.util.*</xsp:include>
<xsp:include>javax.servlet.*</xsp:include>
<xsp:include>javax.servlet.http.*</xsp:include>
</xsp:structure>
<xsp:logic>
String type_exp=request.getParameter("type");
String[] val=request.getParameterValues("select_item[]");
String chaine="";
int longueur=val.length;

// construction de la chaine des conditions requises

for (int i=0;i&lt;longueur;i++) {
chaine=chaine+"[livre_tbl.id_livre=meta_"+type_exp+"_tbl.id_livre"+
" AND meta_"+type_exp+"_tbl.id_"+type_exp+"=\""+val[i]+"\"]";
if (i&lt;(longueur-1)) {
chaine=chaine+" OR ";
}
};

// construction de la requete

String requete="SELECT livre_tbl.id_livre livre_tbl.titre FROM livre_tbl, "+
"meta_"+type_exp+"_tbl WHERE ("+chaine+")";

</xsp:logic>
<resultat>
<esql:connection>
<esql:pool>polluser</esql:pool>
<esql:execute-query>
<req>
<esql:query>
<xsp:expr>requete</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<item>
<xsp:attribute name="id">
<esql:get-int column="id_livre"/>
</xsp:attribute>
<esql:get-string column="titre"/>
</item>
</esql:row-results>
</esql:results>
</req>
</esql:execute-query>
</esql:connection>
</resultat>
</xsp:page>


Does someone could help me ?

Alex
(sorry for my poor english ;)




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to