cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric SCHAEFFER" <>
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, 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.




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

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

----- Original Message -----
From: Mike Engelhart <>
To: <>
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
> 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
> 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
> it there so that the XSP page could use the "session" variable without
> having to declare it.
> Mike
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message