cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil" <>
Subject RE: how to test if a Session context exist from sitemap and sessiontransformer ?
Date Wed, 25 May 2005 11:02:51 GMT
If I understand you correctly when you request a parameter(attribute?) from
the session you get an error and want to know if this is normal?
That depends how you are making the request!

Using xsp you can use:
<xsp-session:get-attribute name="PersonID"/>
If there is no session it won't error - there jst won't be anything there!

In the sitemap you can use:
<map:match type="sessionstate" pattern="*">
	<map:parameter name="attribute-name" value="PersonID"/>
	<map:match pattern="*/*/*" label="debug">  <------ 'protected'
pipeline which requires PersonID to be set to 'pattern' (in this case  a
wildcard) other stuff
 that is if you are using the default cocoon sitemap (or a sub sitemap of
it) or you have the matcher sessionstate defined like this:
    <map:matcher logger="sitemap.matcher.sessionstate" name="sessionstate"
Within the matchers section of the sitemap (see the default cocoon sitemap
for mor info)

For future posts here may I suggest as it says in the introductory email to
this list that you are more specific about the exact nature of your
question, where possible include a way by which someone can re-create the
error and very importantly include the operating system, serverlet type and
version java version and cocoon version. This will make a reply more likely
and ultimately mean you probably solve your problem faster... Which is what
we all need isn't it!

Hope this helps anyhow


-----Original Message-----
From: Franck Omrane [] 
Sent: 25 May 2005 11:30
Subject: how to test if a Session context exist from sitemap and
sessiontransformer ?


if i try to get a param from a session context which doesn't exit i get 
an error .... normal .
but how to test if the context exist  ?
in two ways :

-- from the sitemap to   choose the right pipeline.
-- from the session transformer to create the context if it doesn't exist

thanks for your help

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

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

View raw message