I am not sure by what you mean "How is it accessed";
it is called by the sitemap as a generator at the start
of a match entry... in fact, the same XSP may be called
from more than one match; with different processing
and transformation taking place thereafter.
 
How can I avoid each XSP creating a new session?
 
Thanks
Derek

>>> [EMAIL PROTECTED] 10/02/2003 08:20:53 >>>
hi derek,

could you tell me please how the XSP is accessed? the problem might be that
your XSP is dealing with a different session (XSPs default to creating a new
session).

> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Im
> Auftrag von Derek Hohls
> Gesendet: Montag, 10. Februar 2003 14:33
> An: [EMAIL PROTECTED]
> Betreff: Accessing named session attributes in XSP?
>
>
> 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]>
>


---------------------------------------------------------------------
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]>


--
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."

Reply via email to