You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ricardo Rocha <ri...@apache.org> on 2000/05/07 02:56:35 UTC

Session creation in XSP

Sessions are not automatically created by XSP pages. Until now, if you wanted
to create a session, you had to include an <xsp:logic> block to do so:

  <xsp:page language="java" ...>
    <my-page>
      . . .
        <xsp:logic>session = request.getSession(true);</xsp:logic>
      . . .
    </my-page>
  </xsp:page>

A new attribute has been added to the <xsp:page> element to allow for
automatic session creation without any intervening <xsp:logic>:

  <xsp:page language="java" create-session="yes" ...>
    ...
  </xsp:page>

Both "yes" and "true" are recognized for the "create-session" attribute

Re: Session creation in XSP

Posted by Ricardo Rocha <ri...@apache.org>.
On Sat, 06 May 2000, Kevin Burton wrote:
> Ricardo Rocha wrote:
> > Both "yes" and "true" are recognized for the "create-session" attribute
> 
> Why are we supporting both "yes" and "true".... Why not just use "true"
> and "false" so that this maps to an XML Schema boolean datatype?  Just a
> thought.

I may have succumbed to the infamous FS. You're right: we should
adhere to XML Schema usage.

Ricardo

Re: Session creation in XSP

Posted by "Kevin A. Burton" <bu...@relativity.yi.org>.
Ricardo Rocha wrote:
> 
> Sessions are not automatically created by XSP pages. Until now, if you wanted
> to create a session, you had to include an <xsp:logic> block to do so:
> 
>   <xsp:page language="java" ...>
>     <my-page>
>       . . .
>         <xsp:logic>session = request.getSession(true);</xsp:logic>
>       . . .
>     </my-page>
>   </xsp:page>
> 
> A new attribute has been added to the <xsp:page> element to allow for
> automatic session creation without any intervening <xsp:logic>:
> 
>   <xsp:page language="java" create-session="yes" ...>
>     ...
>   </xsp:page>
> 
> Both "yes" and "true" are recognized for the "create-session" attribute

Why are we supporting both "yes" and "true".... Why not just use "true"
and "false" so that this maps to an XML Schema boolean datatype?  Just a
thought.

Kevin

-- 
Kevin A Burton (burton@apache.org)
http://relativity.yi.org
Message to SUN:  "Please Open Source Java!"
The house of the unbelievers shall be razed and they shall be
scorched to the earth. Their code will be open until the end of days.

Re: Session creation in XSP

Posted by Ricardo Rocha <ri...@apache.org>.
On Sun, 07 May 2000, MIchele Bianchi wrote:
> On Sat, 6 May 2000, Ricardo Rocha wrote:
> > A new attribute has been added to the <xsp:page> element to allow for
> > automatic session creation without any intervening <xsp:logic>:
> >   <xsp:page language="java" create-session="yes" ...>
> >     ...
> >   </xsp:page>
> you mean you have planned to add it.  i tried but with no result, i looked in
> the 1.7.3 code and it seems not to be included.

It's available in 1.7.4, not in 1.7.3.

Valid values for attribute "create-session" are now "true" or "false"
(as opposed to "yes" and "no")

Re: Session creation in XSP

Posted by Michele Bianchi <mi...@exsense.com>.
On Sat, 6 May 2000, Ricardo Rocha wrote:

> A new attribute has been added to the <xsp:page> element to allow for
> automatic session creation without any intervening <xsp:logic>:
> 
>   <xsp:page language="java" create-session="yes" ...>
>     ...
>   </xsp:page>

you mean you have planned to add it.  i tried but with no result, i looked in
the 1.7.3 code and it seems not to be included.

-------------------------------------------------------------------------------
michele_bianchi                                  exsense | integrated_solutions
phone://+39_348_7651874                                       via_scrimiari_45b
http://mic.aesthetica.it                                     37132_verona_italy