cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baer Peter <>
Subject Re: RE: How to put user data into SunspotDemoPortal-session at logon time
Date Tue, 19 Mar 2002 12:40:27 GMT
Thanks for the reply. It works. We can get the parameter out of the 
session now.

However, what we actually need is a single value which we can pass as a 
parameter to the following generator or transformer.

<map:generate src="application.xml">
	<map:parameter name="user_id" value="{session/user/name}"/>

Thus we could generate user-specific menus at runtime. Eg, the options 
in drop-down menu could depend on the region the user belongs to.

Merging the session XML and the application XML is not appropriate for 
us, as we don't want to have them transformed before the XSP statements 
in the resulting XML are evaluated.

Any clues?

Thanks in advance!


 >Everything is already in the session, stored in a so called 
 >named "sunRise".
 >The "authentication document" defined for the portal which actually
 >does the login of a user delivers these information to sunRise which
 >then stores them into the session. These information are usually
 >the user ID, the first name, the last name etc.
 >By adopting this resource, you can store more infos in the session.
 >You can get them in an XML processing pipeline by using the sunShine
 >transformer. So you can write an XML file, like this:
 ><doc xmlns:sunshine="";>
 ><sunshine:getxml context="sunRise" path="/"/>
 >If you now build a sunLet reading this XML document and using the 
 >transformer, you will get all information stored in the session about
 >the current user.
 >As the info is stored as an XML tree in the session by varying the
 >"path" attribute of "getxml" you can get one specific info, like:
 >   <sunshine:getxml context="sunRise" path="/authentication/ID"/>

 >> Peter Baer wrote:
 >> > We need the user name and some user specific information in the 
 >> SunspotDemoPortal session.
 >> Our question is because the default session attributes (and their
 >> values) aren't particularly speeky.
 >> > How can we trigger the portal to add the user name and other 
 >> information (like boolean flags) into the session?
 >> Or are there already some user informations in the session, inserted 
 >> the portal?
 >> > And if so, how are they named / how can we get them out?

|              >>>  <<<             |

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message