I wrote a separate pipeline, to test the authentication mechanism. I took
the authentication fw from the samples directory in cocoon 2.1.2

I have managed to write the form, retrieve the parameters in an xsp File,
with esql  query the db and 
it gives me the correct this result: 
<?xml version="1.0" encoding="UTF-8" ?> 
 <authentication>
        <ID>user</ID> 
</authentication>

But when i use the esql.xsp file and the authentication.xsl in the
authentication framework, it doesn't work.
I can't imagine why.  
In the authenticate.xsl File I have deleted the xsl:if, because when the
user can't be found, it would give an no records found message, so the xsl:if is
obsolete. 

Here is the sitemap entry : 
                <map:pipeline internal-only="true">
                        <!-- This is the authentication respource -->
                        <map:match pattern="authenticate">
                                <map:generate type="serverpages"
src="auth/docs/esql.xsp">
                                        <map:parameter name="lang"
value="{1}"/>
                                        <map:parameter
name="use-request-parameters" value="true"/>
                                </map:generate>
                                <map:transform
src="auth/stylesheets/authenticate.xsl">
                                        <map:parameter
name="use-request-parameters" value="true"/>
                                </map:transform>
                                <map:serialize type="xml"/>
                        </map:match>
                </map:pipeline>


Here are the Files, I'm using so far: 
esql.xsp File: 
<?xml version="1.0" encoding="iso-8859-1"?>
<xsp:page 
        language="java"
        xmlns:xsp="http://apache.org/xsp";
        xmlns:esql="http://apache.org/cocoon/SQL/v2";
        xmlns:xsp-request="http://apache.org/xsp/request/2.0";
        >

<authentication>
        <xsp:logic>
           String lang = parameters.getParameter("lang", null);
        </xsp:logic>
        <esql:connection>
        <esql:pool>kt01</esql:pool>
        <esql:execute-query>
                <esql:query>
                        select * from benutzer 
                        where username='<xsp-request:get-parameter
name="username"/>'
                        and password='<xsp-request:get-parameter
name="password"/>'
                </esql:query>
                <esql:results>
                        <esql:row-results>
                                <users><user>
                                <name><esql:get-string
column="username"/></name>
                                </user></users>
                        </esql:row-results>
                </esql:results>
                <esql:no-results><no-results/></esql:no-results>
                <esql:error-results>
                       
<error><message><esql:get-message/></message></error>
                </esql:error-results>
        </esql:execute-query>
        </esql:connection>
</authentication>
</xsp:page>

authenticate.xsl file: 
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="authentication">
  <authentication>
        <xsl:apply-templates select="users"/>
  </authentication>
</xsl:template>

<xsl:template match="users">
    <xsl:apply-templates select="user"/>
</xsl:template>

<xsl:template match="user">
        <ID><xsl:value-of select="name"/></ID>
</xsl:template>

</xsl:stylesheet>


I really don't know what else I now can do, to solve this problem. 
Thanks for your kind help


-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to