cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Newland" <>
Subject Possible to assign SQL query result to XSP variable?
Date Mon, 20 Aug 2001 11:21:15 GMT
Hi All,

I'm trying to test for the presence of a key in an SQL table by performing
an SQL query and having the result (or null) set in an XSP variable:

<para>checking for username = <xsp:expr>username</xsp:expr></para>

String got_uname = "dummy";

                  select id from enduser where =
                	got_uname = <esql:get-string column="id"/>;

<para>got value from db uname = <xsp:expr>got_uname</xsp:expr></para>

where 'id' is the primary key column in the enduser table.

Is this even a rational thing to try and do?

When the page executes, the value for got_uname is "dummy" and the Java code
created from the page does not attempt to assign the got_uname variable to
the SQL result.

Can somebody let me know if it is actually possible/reasonable to try and
assign XSP variables from SQL queries?

Thanks for your help,


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message