I know I am missing something *very* obvious, but
I have "end of day" stare here, and cannot figure what
mistake I am making.
I am using the Database Authenticator to process a
login - the user ID is stored in a session attribute called
"userrname" The auth.xml used looks like:
<auth-descriptor>
<connection>myDB</connection>
<table name="user">
<select dbcol="UserName" request-param="username"
to-session="username"/>
<select dbcol="UserPassword" request-param="userpass" />
</table>
</auth-descriptor>
This process seems to be working, as I can now get
access to the protected part of the pipeline: ie.
<map:match type="sessionstate" pattern="*">
<map:parameter name="attribute-name" value="username"/>
<!-- all this is accessible after login -->
</map:match>
However, when I try and use the username attribute in
an XSP file, I just get a "null" returned - here's the snippet
from the file:
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-session="http://apache.org/xsp/request/2.0"
>
<!-- Page-level logic -->
<page>
<xsp:logic>
//session
String sUserName = <xsp-session:get-attribute name="username"
as="string"/>;
</xsp:logic>
<element><xsp:expr>sUserName</xsp:expr></element>
</page>
The <element> now contains "null" (wihtout the ")
Any idea how to get the username out into the XSP??
Thanks
Derek
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."
---------------------------------------------------------------------
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]>