Hi,
I am using session heavily and JServ works perfectly well for me. My system is used
for web-based mail interface so the session tracking is very important.
Steve Nguyen
[EMAIL PROTECTED]
http://www.kbmail.com
-------- Original message --------
Return-Path: <[EMAIL PROTECTED]>
Received: from cgi.clearink.com (cgi.clearink.com [205.227.188.8])
by bizserv.biz1.net (8.9.2/8.9.2) with SMTP id LAA11408
for <[EMAIL PROTECTED]>; Tue, 18 May 1999 11:09:52 -0500 (CDT)
Received: from blastradius.com by cgi.clearink.com with SMTP; Tue, 18 May
1999 09:06:22 -0700
Message-ID: <003801bea148$76ea81f0$[EMAIL PROTECTED]>
From: "Mike Varley" <[EMAIL PROTECTED]>
To: "Java-Apache-list" <[EMAIL PROTECTED]>
Subject: Session Tracking problem
Date: Tue, 18 May 1999 09:07:01 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
Sender: <[EMAIL PROTECTED]>
Precedence: Bulk
List-Software: LetterRip Pro 3.0.5b5 by Fog City Software, Inc.
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Digest: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
----------------------------------
I am trying to use the session tracking API with JServ, but have run
into a problem in that sessions don't get tracked properly. I can run
the servlets on the Java Web server and they track perfectly.
But I don't want to use the JWS. :)
Basically, when I go to new pages, the HttpSession session =
req.getSession(false) always returns null; using (true) means I get a
new session ID on every page.
here is the code at the top of all my doPost(req, res) methods:
res.setContentType("text/html");
ServletOutputStream outPut = res.getOutputStream();
HttpSession session = req.getSession(true);
I read in the bug report:
------------------
Due to the same protocol restrictions, headers are sent as soon as something
is written on the output, preventing any change on them (sessions, cookies).
To
avoid this, you may buffer your output in your servlet and send it
afterwards.
------------------
What does this mean? Should I be piping everything through a
BufferedWriter, or a StringBuffer, and then doing a flush() in order to get
session tracking working properly?
Note that IE 5 seems to be able to keep the session alive, but Netscape 4.51
cannot! And I do *not* have Netscape cookies turned off....
I have the latest release of Apache running on a FreeBSD box
Please, any hints or help on how to get this working would be greatly
appreciated.
MV
Mike Varley
[EMAIL PROTECTED]
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]