cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai.Reh...@pass-consulting.com
Subject XSP:LOGIC
Date Wed, 25 Oct 2000 13:33:03 GMT
May someone help me with the following problem?

I pass the variable "K" to this page. "K" looks like "XXX,YYY" .
The question now is how to retrieve "K" in my <xsp:logic> so that it can be
processed and returned to the query below.

Please help me!
Thank You
Kai 

<?xml version="1.0" encoding="UTF-8"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="./Upload2.xsl" type="text/xsl"?>

<xsp:page language="java" 
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<xsp:logic>
private int i = 0;

public String Pars() {

while (K.charAt(i) != ',') i++;
K=K.substring(0,i);
System.out.println(K);
return K;
}
</xsp:logic>

<page>
	<connectiondefs>
		<connection name="FuE">
			<driver>COM.ibm.db2.jdbc.app.DB2Driver</driver>
			<dburl>jdbc:db2:FuE</dburl>
			<username>***</username>
			<password>***</password>
		</connection>
	</connectiondefs>
	<query connection="FuE">select c.catid, c.name, cat.cat_catid,
cat.catid 
						from category as c, cat_cat
as cat
						where cat.catid = {@K} and
c.catid = cat.cat_catid
	</query>
</page>

</xsp:page>


Mime
View raw message