from within an XSP you can have a session be created by specifying the
<xsp:page>'s attribute @create-session="true" (this is handled by the
session logicsheet. this way a session will be created if it didn't yet
exist.

problems can occur with these sessions, though; sessions created by the
session logicsheet from within the XSP are created when actual generation
begins, i.e. after pipeline setup. thus, transformers in the pipeline (for
which the XSP is the generator) won't see the session instantly.

your safest bet is to create the session before the generator step (e.g. via
an action) and have the generator access this one via the session
logicsheet.

> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von [EMAIL PROTECTED]
> Gesendet: Mittwoch, 26. Februar 2003 12:38
> An: [EMAIL PROTECTED]
> Betreff: <xsp-session> and JAVA sessions
>
>
> What is the difference between these two sessions??? :
>
>
> JAVA session:
> <xsp:structure>
>  <xsp:include>org.apache.cocoon.environment.Session</xsp:include>
> </xsp:structure>
> ...
> <xsp:logic>
>  Session session = null;
>  ...
>  session = request.getSession(true);
>  session.setAttribute("user",user);
> ...
> </xsp:logic>
>
> --------------------------------------
>
> XSP SESSION:
> <xsp:page language="java"
>  xmlns:xsp="http://apache.org/xsp";
>  xmlns:session="http://apache.org/xsp/session/2.0";
> >
> ...
> <session:set-attribute
> name="user"><xsp:expr>user</xsp:expr></session:set-attribute>
> ...
>
>
>
> Is there a way to create and set a JAVA session and then get an
> attribute with session-xsp, like
> <session:get-attribute name="user"/>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to