You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joel McConaughy <jo...@displayware.com> on 2004/08/14 20:45:45 UTC
How to use {session-context} in sitemap?
I'm trying to access the session context from the sitemap using
{session-context:session/attribute} syntax as described in the session
docs but am getting an empty value. It looks like I have properly set
the session attribute but that the core.session-manager can't find it.
What am I doing wrong?
Cocoon 2.1.5, Tomcat 5.0.19
Thanks, joel
From flow:
cocoon.session.setAttribute('covers', 'sampledata/covers');
var s = cocoon.session.getAttribute('covers');
// At this point, s == 'sampledata/covers/'
From sitemap.xmap:
<map:pipeline>
<map:match pattern="getImage">
<map:read
src="{session-context:session/covers}/{request-param:upc}.jpg"
mime-type="image/jpeg" />
</map:match>
From core.log:
SESSION ATTRIBUTES:
PARAM: 'covers' VALUE: 'sampledata/covers'
DEBUG (2004-08-14) 11:33.37:252 [core.session-manager]
(/cocoon/pp/getImage) http8080-Processor23/DefaultContextManager: BEGIN
getContext name=session
DEBUG (2004-08-14) 11:33.37:252 [core.session-manager]
(/cocoon/pp/getImage) http8080-Processor23/DefaultContextManager: END
getContext context=null
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org