Alvaro Fuentes wrote:
>
> We are developing a group of servlets that need to share some info
> stored in a session. The first servlet creates the session and the other
> ones retrieve the info from that session. The problem is that those
> servlets which call
> req.getSession(false) seem to behave randomly: sometimes they get the
> session, sometimes they just return null. I think this is because of
> servlet-reloading when compiling: if we delete ALL servlets (.class),
> then compile and call servlets, there's no problem. But if we
> individually compile one servlet, this will not get the session info
> correctly.
> Is it possible?
> Any other possible cause?
> We're using JRun and Netscape Server.

I have seen similar behavior with Netscape browser. It was caused
by port number included in URL. Following URLs:

http://mymachine/servlet/MyServlet
http://mymachine:80/servlet/MyServlet
http://mymachine.mydomain.com/servlet/MyServlet
http://mymachine.mydomain.com:80/servlet/MyServlet

are treated as different servers so you cannot share sessions
among them. Check if this is your case.

Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: [EMAIL PROTECTED]
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1  C3 48 B2 59 00 58 42 27
 http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------

___________________________________________________________________________
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

Reply via email to