Well, i had exactly the same problem !!!
I have traced, the id the client browser :
at the first request, the id of the client has the value of the last
session, and the third servlet looses the session.
If the id of the client is  null before the first request, everythiong works
fine.
If you look at the second request, you'll see that both id are the same and
there is no problem.
So, i have reduce the time of the maxInactiveInterval and i do not have
problem any more.

I know it's not a solution, but ...
We'll see later if somebody  has the solution !!!

Sorry


> -----Message d'origine-----
> De:   Allen Hopkins [SMTP:[EMAIL PROTECTED]]
> Date: vendredi 25 mai 2001 02:27
> �:    [EMAIL PROTECTED]
> Objet:        2 forwards, HttpSession gone
> 
> I have a problem that I've cooked down to a simple test scenario:
> A servlet (call it servlet_1) gets an HttpSession and sets an
> attribute in it:
> 
>         req.getSession().setAttribute(new String("Boo!"));
> 
> It then forwards to another servlet, servlet_2, which in turn
> forwards to another servlet, servlet_3.
> 
> The attribute set in servlet_1 is nowhere to be found in the
> HttpSession that servlet_3 gets from req.getSession().  And,
> servlet_3's session has a different ID from the one in the
> previous two servlets.
> 
> servlet_2, however, was able to access the attribute from the session
> it got from req.getSession(), which had the same ID as the original
> in servlet_1.
> 
> What happens to the HttpSession on that second forward?
> 
> This happens:
>         - under tomcat 3.2.1 apache 1.3.19, Solaris 2.8, Sun Ultra 60
>         - when the servlet is first accessed after a server restart,
>         - when the servlet is again accessed after the 30-minute
>             session timeout.
> 
> It doesn't happen (the session attribute is accessible from servlet_3):
>         - all other times, i.e. the session has been created in a
>             previous access of the servlet(s), less than 1/2 hour ago.
> 
> Does this make sense to anybody?  Suggestions welcome.  Thanks.
> 
> -Allen Hopkins
> Gigascale Silicon Research Center
> UC Berkeley

Reply via email to