I had the same problems when using NS 4.X.
Everything works fine now, as I use StringBuffer everywhere and the
write the content once (hope that this is the reason why it works now!).
Mike Varley wrote:
>
> 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]
--
Guenther Wieser
creative-it/Guenther Wieser Software KEG
Student of Telematik at Graz University of Technology
http://www.creative-it.com mailto:[EMAIL PROTECTED]
-> In A World Without Walls And Fences, Who Needs Windows And Gates? <-
-- --------------------------------------------------------------
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]