Markus Heussen wrote:
What Cocoon Version do you use? I use the current cvs head Cocoon 2.1.4dev with J2SDK-1.4.2. Maybe there is a bug in your version?By the way. Could you please remove mail addresses in your postings to prevent spam attacks? Thanx :-)Markus-----Ursprüngliche Nachricht-----
Von: Vincent Charlot
Gesendet: Dienstag, 27. Januar 2004 17:04
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: parameter in a pipelineIt still doesn't work although I've got the same content than Markus....Can someone help me?Vincent
Markus Heussen wrote:rhld:action is my xsp root element nothing else. this is not the cause of your problem. my action looks like yours and everything works fine for me. here's my action:<?xml version="1.0" encoding="UTF-8"?>
<!--
GetPdfDocumentId.xsp --><
xsp:page version="1.0" language="java"xmlns:xsp
="http://apache.org/xsp"xmlns:esql
="http://apache.org/cocoon/SQL/v2"xmlns:util
="http://apache.org/xsp/util/2.0"xmlns:rhld
="http://schema.rheinland.net/rhld/1.0"xmlns:action
="http://apache.org/cocoon/action/1.0"xmlns:xsp-request
="http://apache.org/xsp/request/2.0"> <rhld:action id="GetPdfDocumentId"> <esql:connection> <esql:pool>controlcenter</esql:pool> <esql:execute-query> <esql:query>SELECT dokument_id FROM gui_pdf_dokument WHERE pdftyp = 1 AND antragsnummer = '<xsp-request:get-parameter name="id"/>'</esql:query> <esql:results> <esql:row-results> <action:set-result name="pdfDocumentId"> <action:param name="value"><esql:get-int column="dokument_id"/></action:param> </action:set-result> <action:set-success/> </esql:row-results> </esql:results> <esql:no-results><action:set-failure/></esql:no-results> <esql:error-results><action:set-failure/></esql:error-results> </esql:execute-query> </esql:connection> </rhld:action></
xsp:page>-----Ursprüngliche Nachricht-----
Von: Vincent Charlot
Gesendet: Dienstag, 27. Januar 2004 11:59
An: [EMAIL PROTECTED]
Betreff: Re: AW: parameter in a pipelineI used what you told me... but unfortunately, it doesn't work...The error message is:org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling num_facture_action_xsp: ERROR 1 (org\apache\cocoon\www\iml\logic\num_facture_action_xsp.java): ... this.actionResultMap.put("num_recup", "" // start error (lines 432-432) "String literal is not properly closed by a double-quote" + " // end error " + " ... Line 432, column 0: String literal is not properly closed by a double-quote
What's the use of your <rhld:action> tag?
Here is a copy of my xsp :
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:action=""
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<action id="num_facture_action">
<esql:connection>
<esql:pool>essaibase</esql:pool>
<esql:execute-query>
<esql:query>SELECT num_facture FROM devis WHERE id_client = <xsp-request:get-parameter name="id_client"/> ORDER BY num_facture DESC</esql:query>
<esql:max-rows>1</esql:max-rows>
<esql:results>
<esql:row-results>
<action:set-result name="num_recup">
<action:param name="value">
<esql:get-int column="num_facture"/>
</action:param>
</action:set-result>
<action:set-success/>
</esql:row-results>
</esql:results>
<esql:no-results><action:set-failure/></esql:no-results>
<esql:error-results><action:set-failure/></esql:error-results>
</esql:execute-query>
</esql:connection>
</action>
</xsp:page>
Markus Heussen wrote:The Sitemap:
<map:match pattern="load.pdf">
<map:act type="serverpages" src="">
<map:read type="gzdatabasereader" src="" mime-type="{request-param:mime-type}">
<map:parameter name="table" value="pdf_log_document"/>
<map:parameter name="image" value="document"/>
<map:parameter name="key" value="id"/>
</map:read>
</map:act>
</map:match>The action:
<rhld:action id="GetPdfDocumentId">
Greetings, Markus
<esql:connection>
<esql:pool>controlcenter</esql:pool>
<esql:execute-query>
<esql:query>SELECT dokument_id FROM gui_pdf_dokument WHERE pdftyp = 1 AND antragsnummer = '<xsp-request:get-parameter name="id"/>'</esql:query>
<esql:results>
<esql:row-results>
<action:set-result name="pdfDocumentId">
<action:param name="value"><esql:get-int column="dokument_id"/></action:param>
</action:set-result>
<action:set-success/>
</esql:row-results>
</esql:results>
<esql:no-results><action:set-failure/></esql:no-results>
<esql:error-results><action:set-failure/></esql:error-results>
</esql:execute-query>
</esql:connection>
</rhld:action>-----Ursprüngliche Nachricht-----
Von: Vincent Charlot
Gesendet: Montag, 26. Januar 2004 19:26
An: [EMAIL PROTECTED]
Betreff: parameter in a pipelineHi!
I'm using an XSP to get the value of a parameter (called num_recup) from a
SQL database.
I'd like to use this parameter at the end of the same pipeline with a
"redirect":
<map:redirect-to uri="cocoon:id_data.html?num={num_recup}"/>
The problem is that I don't know how to recover the value within the
pipeline. I tried with a xsp action, but I didn' succeed...
How can I do?
Thanks!
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail