It seems like we have a similar problem. I have been experimenting with
sessions under Jrun 2.3 for a week now, and it seems like the same
session has to be created 3 or 4 times before it works.
Our servlet contains the code (in the doPost-method):
...
HttpSession sissy = request.getSession(true);
if (sissy.isNew()) {
do something
and print the session-Id
}
else {
do something totally different
and print the session-Id
}
...
and for the first 4 calls to the servlet the comparison sissy.isNew()
always returns true, even though the session-Id is the same each time.
After the fifth call (and in all the following calls) to the servlet the
else-case is executed while the session-Id is still the same.
I have been really frustrated by this, because I can see no apparent
reason for this behaviour. Are not sessions supposed to be created at
the first call to the method request.getSession(true), this being the
only occasion when the isNew()-method should return true, and at all
other occasions it should use an older, already created, session-Id?
Have I totally misunderstood the specifications?
What did your workaround look like? Why is there need for one? Is this a
Jrun-problem or a general sessionproblem?
Micael
> -----Ursprungligt meddelande-----
> Fr�n: Ingo Gringer [SMTP:[EMAIL PROTECTED]]
> Skickat: den 6 augusti 1999 07:48
> Till: [EMAIL PROTECTED]
> �mne: JRun Session problem: ealiest the second got one
>
> Hello,
>
> a strange problem under Jrun 2.3: if I try to open a session they
> will
> be found usually after a _second_ request. So I tried a workaround
> and
> repeat starting a servlet as long a same session is catched.
> Common problem?
>
> Regards, Ingo
>
> ______________________________________________________________________
> _____
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
> http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html