Hello All,

I tried to authenticate from database based on JD. Daniels's:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg09607.html

I have some problems:
1. 
<?xml version="1.0"?>
 <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";;
     xmlns:xsp-session="http://apache.org/xsp/session/2.0";;
 create-session="true"
     xmlns:source="http://apache.org/cocoon/source/1.0";;
     xmlns:util="http://apache.org/xsp/util/2.0";;
     >
- there are semicolons on end of all lines, which is seems to be syntax 
error.
-  create-session="true" also a syntax error

2 I changed it, and try to run, and I get an error:

ERROR   (2004-03-09) 10:24.55:955   [core.authentication-manager] 
(/cocoon/~zamek/a/do-login-portal) Thread-11/PipelineAuthenticator: 
authenticator: Language Exception
org.apache.cocoon.ProcessingException: Language Exception: 
org.apache.cocoon.components.language.LanguageException: Error compiling 
authdb_xsp:
ERROR 1 
(org/apache/cocoon/www/file_/home/zamek/public_html/a/java/authdb_xsp.java):
...

        this.characters("\n                    ");

      session.setAttribute(String.valueOf("userId"),
// start error (lines 516-516) "String literal is not properly closed by a 
double-quote"
          "
// end error

here is the snippet:

<authentication>
    <esql:connection>
        <esql:pool>portal</esql:pool>
        <esql:execute-query>
           <esql:query>
              SELECT usrid, firstName, lastName, email, role_id, role
              FROM authenticate ('<xsp-request:get-parameter 
name="username"/>',
                                 '<xsp-request:get-parameter 
name="password"/>')
              LIMIT 1;
           </esql:query>
           <esql:results>
             <esql:row-results>
                <ID><esql:get-int column="usrid"/></ID>
                <role><esql:get-string column="role"/></role>
                <data>
                    <xsp-session:set-attribute name="userId">  

<----------------- maybe here is the language exception

                      <esql:get-string column="usrid"/>
                    </xsp-session:set-attribute>
                    <xsp-session:set-attribute name="userRole">
                      <esql:get-string column="role"/>
                    </xsp-session:set-attribute>
                    <xsp-session:set-attribute name="userFirstName">


So can anybody send me a working version of this xsp?

-- 
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

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

Reply via email to