Mark,
I try to configure out the authenticate resource using XSP calling to the
database (see the code bellow). The <xsp-request:get-parameter
name="userName"/> within the select statement seems not work correctly. The
following exception is thrown :
C2.1 Exception :
================
java.lang.NullPointerException
at
org.apache.xerces.dom.ParentNode.internalInsertBefore(ParentNode.java:333)
at org.apache.xerces.dom.ParentNode.insertBefore(ParentNode.java:320)
at org.apache.xerces.dom.NodeImpl.appendChild(NodeImpl.java:267)
at
org.apache.cocoon.webapps.authentication.components.AuthenticationManager.au
thenticate(AuthenticationManager.java:460)
at
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAction.
java:130)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
eNode.java:133)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
...
XSP code :
==========
<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">
<page>
<content>
<esql:connection>
<esql:pool>portal</esql:pool>
<esql:execute-query>
<esql:query>
SELECT id,password,color from PORTALUSER_TABLE where id =
'<xsp-request:get-parameter name="userName"/>'
</esql:query>
<esql:results>
<esql:row-results>
<authentication>
<ID>
<esql:get-string column="id"/>
</ID>
<color>
<esql:get-string column="color"/>
</color>
</authentication>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</content>
</page>
</xsp:page>
Any help. I'll appreciate if you can send me your XSP code that access to
the datastore
Thanks in advance
Senhaji
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:Markdelanoy@;aol.com]
Envoy� : lundi 4 novembre 2002 18:40
� : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : Re: Ldap authentication
If you want to use the authentication framework look at the authenticate
resource. You'll get passed in a password/username and really anything else
you had in your login page. Then within the authenticate resource you can
call LDAP. the resource can be a cocoon pipeline or some external resource.
I use XSP in my authenticate resource calling to the database but you could
call LDAP.
MD
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>