cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric SCHAEFFER" <eschaef...@posterconseil.com>
Subject Re: Session Created by XSP? [Problems with xsp-java.xsl]
Date Wed, 02 Feb 2000 15:56:13 GMT
I meant changing the xsl file in the jar (or create a new one and change the
cocoon.properties, but of course for all XSP pages).

Sessions are a problem. There's the notion of 'creation', and therefor an
xsp tag for creating a new session should exist. Or maybe better, a tag for
making the session object available with creation (getSession(true)) or
without creation (getSession(false)).

But it must be changed in the XSP 'Core' stylesheet.


Eric.

_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059

----------------------------------------------------------------------------
-----------------------------
 Come to the first official Apache Software Foundation Conference!
-----------------------------------
http://ApacheCon.Com ------------------------------------
_______________________________________

----- Original Message -----
From: Mike Engelhart <mengelhart@earthtrip.com>
To: <cocoon-users@xml.apache.org>
Sent: Wednesday, February 02, 2000 4:29 PM
Subject: Re: Session Created by XSP? [Problems with xsp-java.xsl]


> Eric SCHAEFFER wrote:
>
> > just:
> >
> > HttpSession session = request.getSession(false);
> >
> >
> > If you ask for the session this way and if the client doesn't have a
> > session, it will return null without creating a new one. Isn't it
enougth ?
> >
> > Eric.
> That's not the solution. The issue is that the xsp-java.xsl file that is
in
> the Cocoon.jar file (this file is the template used to create the compiled
> XSP classes) hardcodes this:
> HttpSession session = request.getSession(true);
>
> in the template so that unless you go into the jar file and change it to
> false, ALL XSP pages create a session whether you want one or not.  This
> needs to be changed.  It would be trivial to do what JSP does and have a
tag
> of some sort that determines session creation.
> I personally can't wait and changed the xsl file in Cocoon to this:
> HttpSession session = request.getSession(false);
>
> This way it doesn't break the code that relies on the session object being
> there and also doesn't implicitly create a new session.  I think Ricardo
put
> it there so that the XSP page could use the "session" variable without
> having to declare it.
>
> Mike
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Mime
View raw message