Hello All,
i'm using Cocoon 2.0.4 on Tomcat 4.0.4. I have to get the username parameter from the context after the authentication of a user using the authentication framework.
I tried to use this code, that I read on the online guide:
 
 <session:getxml context="authentication" path="/application/username"/>
 
but the mentioned "session transformer" isn't present in my cocoon version sitemap.
So I've tried to use the sunshine transformer, used in my saveuserstatus.xml with this code:
 
<sunshine:getxml context="request" path="/parameter/ID"/>
 
I've changed the context to "authentication", "sunRise", " sunrise", but I don't obtain the username parameter.
I've used an xsp page to obtain the parameters of my session.
code of the request:

<xsp-session:get-attribute-names as="xml"/>

result:

- <doc xmlns:xsp="http://apache.org/xsp" xmlns:xsp-session="http://apache.org/xsp/session/2.0">
- <xsp-session:attribute-names>
  <xsp-session:attribute-name>org.apache.cocoon.sunshine.context.TransactionState</xsp-session:attribute-name>
  <xsp-session:attribute-name>sunSpotConfportalhandler:playlibportal</xsp-session:attribute-name>
  <xsp-session:attribute-name>org.apache.cocoon.sunshine.context.SessionContext</xsp-session:attribute-name>
  <xsp-session:attribute-name>org.apache.cocoon.sunshine.sunrise.Handlers</xsp-session:attribute-name>
  <xsp-session:attribute-name>uprofile:portalhandler|playlibportal:user_5_Admin_roby</xsp-session:attribute-name>
  <xsp-session:attribute-name>org.apache.cocoon.sunshine.sunrise.SessionContext</xsp-session:attribute-name>
  </xsp-session:attribute-names>
 if I get a parameter of this session using:

<xsp-session:get-attribute name="org.apache.cocoon.sunshine.sunrise.SessionContext" as="xml"/>

I obtain:

<xsp-session:attribute>[EMAIL PROTECTED]</xsp-session:attribute>

I have no idea of what can I do to obtain my username parameter, please tell me something that can I try to do.

Thanks All.

Roberto

 

Reply via email to