You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kogan Irina <Ir...@mchp.siemens.de> on 2003/05/06 17:33:22 UTC
Authentication framework: SQL question.
Hello everybody,
I am using TomCat and the authentication framework in Cocoon. Does anybody
know how I can read names and passwords from the database and to compare
them to the request parameters? I am trying to do the following in my
stylesheet called insertparameters.xsl (XSLT transformations):
...
<xsl:param name="name"/>
<xsl:param name="password"/>
...
<sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<sql:query>select name, password from login where name =
<xsl:value-of select = "$name"/> and password = <xsl:value-of select =
"$password"/>
</sql:query>
</sql:execute-query>
...
(And I am specifying this in my sitemap:
<map:transform src="stylesheets/insertparameters.xsl"/>
<map:transform type="sql" >
<map:parameter name="use-connection" value="dbtest" />
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
)
This query seems to always have an empty set as an answer (even though
without the where close it works properly). Am I getting the value of the
request parameter incorrectly? "{$name}" or saving the result of the request
parameter in the sql:parameter and then acessing it through @ did not work
either. How can I fix this problem?
Does anybody have any examples for this kind of SQL statements (preferably
the ones for authentication framework)?
Thanks a lot! I really appreciate your help!
Irina.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org