You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joel Hughes <jo...@redknee.com> on 2000/02/12 13:52:20 UTC

Cocoon XSP Session ID != Jserv HTTPSession ID

Issue
The ID returned from HttpSession.getID() in my servlet does not match the ID
returned from the same call in the XSP generated java class.
 
These two values should be the same to facilitate message passing and to
hold user state information during a users session.
 
This was working on my development machine and is still working on our
production server, but has recently failed on my dev machine.
 
I've checked the obvious: jar versions, configurations, duplicated the
server environment on dev machine, gone back to old versions - all producing
no change.
I have yet to reinstall Cocoon or Apache JServ.
 
Has any one else experienced this?
 
Configuration
NT 4.0 SP6
Apache 1.3.11
Apache JServ 1.1
Apache Cocoon 1.6.1 (servlet.jar 2.2API)
jdk 1.2.2
jsdk 1.2 (2.2)
 
process 
XML -> XSP -> XSLT -> HTML -> post to servlet -> servlet put.Value into
session 
-> next round of XML -> XSP get.Value from session (values null, as not the
same session)
 
 
Joel Hughes
REDKNEE.com Inc.
Tel: +1 905 625 8235
 

Re: Cocoon XSP Session ID != Jserv HTTPSession ID

Posted by Mike Engelhart <me...@earthtrip.com>.
Joel Hughes wrote:

> Issue 

> XML -> XSP -> XSLT -> HTML -> post to servlet -> servlet put.Value into
> session 
> 
> -> next round of XML -> XSP get.Value from session (values null, as not the
> same session) 
What is the XSP and servlet code you wrote that is getting the session
value?  The XSP engine automatically calls getSession(true) for every XSP
request page. Are you forcing it somehow to create a new session  in your
servlet or XSP pages?  I've been using sessions with XSP and servlets for a
while now and it works fine. The only change I made was to the XSP engine
code to make it call getSession(false) so that it didn't automatically
create a session. This should be changed to the default because rarely do
you want the XSP engine/servlet engine to control session generation.

Mike