Title: RE: Session and JSSI

If I understand your problem correctly, then here's what you might be seeing:

Realize that cookies are sent in the headers of the response, and headers are sent before any output can be returned.  So, any HTML in your page before the <SERVLET> block is going to get returned to the client by the JSSI servlet, before your servlet even gets called.  By then it'll be too late for your servlet to set up a session in a cookie, as the cookies are already gone and on their way back to the browser.

The only obvious solution I came up with was to turn buffering on in the JSSI servlet, by putting the following in your zone.properties file:

  servlet.org.apache.servlet.ssi.SSI.initArgs=buffered=yes

This causes JSSI to buffer the entire page, holding onto the cookie headers and allowing session info to be stored.  However, if your <SERVLET> block takes any amount of time to be resolved, then the user will see a blank screen for a while, and then suddenly the entire page will pop up.  In our case, this time was not acceptable.  Our customers wanted to see each piece of the page appear as it was resolved.  So, we ended up making a change to the JSSI source to support our specific case.  (If you're interested in this, let me know and I'll describe more.)

Jay

-- Jay Burgess
   Digital Archaeology
   mailto:[EMAIL PROTECTED]
   (913) 438-9444 x154




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 25, 2000 5:32 PM
To: [EMAIL PROTECTED]
Subject: Session and JSSI


----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I am having problems with JSSI, using <servlet> tags to call a servlet.
If I call the servlet directly the session information (cookies) are
correctly sent, however if I call the servlet via a <servlet> tag, the
session information is not returned back to the browser.

I am running the newest JSSI, JSERV and apache on solaris 7.  I do not
think that it is an issue with the software itself, but rather a problem
with the configuration.  I however have checked everything according to
install instructions, and do not see anything that appears to be out of
the ordinary. 

Does anyone have any ideas for where I should start looking to solve this?

Reply via email to