You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Gapinski, Gary (GEL, MSX)" <Ga...@lighting.ge.com> on 2001/11/06 22:48:30 UTC

[C2] How can I set "default" session attributes?

I wish to create a sub-sitemap in which all requests are preceded by a
conditional setting
of some session attributes. In particular, I would like to set an attribute
specifying a database
connection pool identifier (to be used by default until a specific request
is later received to change it).
As well, I would like to establish a default locale and timezone for the
session to be used for
subsequent requests (again, if/until a request to change either is
received).
Once I can guarantee that such attributes are available as session
attributes, I would use the
session logicsheet to obtain and use these values within generation steps.

I have not been able to puzzle out how this might be done.

I have looked at SessionPropagatorAction as both an individual action as
well as part of an action-set,
but I have been stumped trying to determine how to have such an action take
place in the presence
or absence of a pre-established session, nor have I found how to get the
attribute(s) set regardless
of which of several matchers handle the request (I'd like any matched
request to undergo the same
setting of default attributes).

Should I be looking at actions, action-sets, selectors, or other techniques?

Regards,

Gary


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: [C2] How can I set "default" session attributes?

Posted by Jeremy Aston <je...@yahoo.co.uk>.
Hi Gary,

If you look at the "protected" examples available from the C2 welcome page
($TOMCAT_HOME/webapps/cocoon/protected) you will see an example of where
session validation is done through actions and a "params.xml" file is used
to set the session vars, including defaults.

HTH

Jez

jez@pigbite.com
C2 Idiots guide - http://www.pigbite.co.uk/ctwig/index.html


-----Original Message-----
From: Gapinski, Gary (GEL, MSX) [mailto:Gary.Gapinski@lighting.ge.com]
Sent: 06 November 2001 21:49
To: 'cocoon-users@xml.apache.org'
Subject: [C2] How can I set "default" session attributes?


I wish to create a sub-sitemap in which all requests are preceded by a
conditional setting
of some session attributes. In particular, I would like to set an attribute
specifying a database
connection pool identifier (to be used by default until a specific request
is later received to change it).
As well, I would like to establish a default locale and timezone for the
session to be used for
subsequent requests (again, if/until a request to change either is
received).
Once I can guarantee that such attributes are available as session
attributes, I would use the
session logicsheet to obtain and use these values within generation steps.

I have not been able to puzzle out how this might be done.

I have looked at SessionPropagatorAction as both an individual action as
well as part of an action-set,
but I have been stumped trying to determine how to have such an action take
place in the presence
or absence of a pre-established session, nor have I found how to get the
attribute(s) set regardless
of which of several matchers handle the request (I'd like any matched
request to undergo the same
setting of default attributes).

Should I be looking at actions, action-sets, selectors, or other techniques?

Regards,

Gary


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>