cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <>
Subject Re: set a session attribute in the sitemap
Date Tue, 19 Dec 2006 19:01:17 GMT
Hi Mark,


First of you need to define the action with a specific 'mode'
<map:action name="setteraction"
    <parameter name="mode" value="session-attribute"/>

You have three options for the mode: 'session-attribute', 
'request-attribute' and the default is 'object-model'.

Then you define the matcher in your sitemap:

<map:match pattern="setteraction">
   <map:act type="setteraction">
     <map:parameter name="setmyaction" value="'123'"/>
   <map:generate src="empty.xml"/>
   <map:serialize type="xml"/>

And you are now able to retrieve the value from flowscript:

function getMySessionParameter()

I could write some java doc code and supply it as a patch in JIRA?


Kind regards,

Jeroen Reijn

Mark Lundquist wrote:
> On Dec 18, 2006, at 7:00 AM, Jeroen Reijn wrote:
>> Or use the SetterAction
> Jeroen, can you post an example of how to use the SetterAction?  The 
> sitemap usage model wasn't clear to me from the API.
> thx,
> —ml—
> P.S. I know how to use the SessionPropagatorAction and I'm not trying to 
> solve any particular problem here... I'm just curious about SetterAction 
> specifically.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message