cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Maxime.Ghey...@swisscom.com>
Subject RE: Request parameters for SQL arguments
Date Mon, 09 Dec 2002 08:13:29 GMT
Hi,

When I write :
				<esql:query>
					<xsp:expr>"select * From AllTask
Where
					 wfID=1"
			      </xsp:expr>
				</esql:query>		
It works, but with :

				<esql:query>
					<xsp:expr>"select * From AllTask
Where
					 wfID=<xsp-request:get-parameter
name="myID"/>
			      </xsp:expr>
				</esql:query>

I get the error : The requested resource () is not available.

-----Original Message-----
From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de] 
Sent: Friday, December 06, 2002 4:28 PM
To: cocoon-users@xml.apache.org
Subject: Re: Request parameters for SQL arguments


On 06.Dec.2002 -- 04:13 PM, Maxime.Gheysen@swisscom.com wrote:
> I use ESQL, the beginning of my page is like this : <?cocoon-process 
> type="xsp"?> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="stylesheets/dynamic-page2html.xsl"
type="text/xsl"?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
> <page>
> 	<content>
> 		<esql:connection>
> 			<esql:pool>personnel</esql:pool>
> 			<esql:execute-query>
> 				<esql:query>
> 					select * From AllTask Where
wfID=<xsp-request:get-parameter name="myID"/>
> 				</esql:query>

> 				
> 				<esql:results>
> ...
> 
> But with this I get an error because of "<xsp-request:get-parameter 
> name="myID"/>"

Yeah, because this will create wrong java code.

So, if you really don't want to do it right, you can

	<esql:query>
	  <xsp:expr>"select * From AllTask Where wfID="
	              + <xsp-request:get-parameter name="myID"/>
      </xsp:expr>
	</esql:query>					

But I would strongly suggest reading the docs.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message