On Mon, Jul 22, 2002 at 06:53:31PM +0200, Johannes Koch wrote:
> Piroumian Konstantin wrote:
> >>>Ah! It should be that servlet container simply strips out
> >>the session Id and
> >>>provides a clear URL. In this case you should use an action
> >>to get the
> >>>session Id from request and use a matcher like: "foo.*".
> >>
> >>How is this done?
> >
> >
> >Take a look at other Session* actions in org.apache.cocoon.acting.*
> >package.
> >You should do something like this in your act() method:
> >
> >Map map = new HashMap(1);
> >map.put("jsessionid",
> >ObjectModelHelper.getRequest(objectModel).getSession().getId());
> >return map;
>
> So, it's not possible only with sitemap things and existing Java code,
> is it?
Use server pages action: you can write an xsp that will do what you need ..
What comes to my mind is:
<xsp:page [namespaces here]>
<page>
<xsp-request:set-attribute
name="session_id"><xsp-session:get-id/></xsp-request:set-attribute>
<action:set-success/>
</page>
I do not remember how but I know there is a way to access a request attribute
in the sitemap syou can have an access to sessionid this way
Would be something like:
<map:match pattern="foo.*">
<map:act type="serverpages" src="[your action file]>
<map:act type="request"><!- I'm not sure if this one works for request
attributes -->
<map:generate src="foo.{../../1}; {session_id}"/><!-- just for
an
example -->
<map:serialize/>
</map:act>
</map:act>
</map:match>
ouzo
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ [EMAIL PROTECTED] _\\()//_
.'/()\'. Phone: +48(600)341118 / // \\ \
\\ // recursive: adj; see recursive | \__/ |
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>