Thanks Kief,

In the full version of my software various servlets & JSP's forward to what
is the 'login' servlet when the session has expired as a means of keeping
the code in one place -- you are absolutely right it would be better if it
was replaced with a class file. The application started life as an ASP app
two years ago and some of the logic if not the code was migrated a year ago
to Tomcat ! I have definitely learnt that what is good practice in one
environment can be anything but in another!

thanks again


Richard

-----Original Message-----
From: Kief Morris [mailto:[EMAIL PROTECTED]]
Sent: 12 February 2001 20:02
To: [EMAIL PROTECTED]
Subject: RE: req.getSession(true) problems with 3.2.1


Richard Downey typed the following on 12:37 PM 2/12/2001 +0000
>I can now re-create the stack overflow problem with the two attached
>servlets. The problem only occurs when you put something into the session
>(in my case I'm using the deprecated getValue,  putValue for compatibility
>with Websphere etc but I *have* tried it with getAttribute / setAttribute
>and it still falls over).

I've finally pinned this one down: it's bug 504, reported at:
http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=504

Basically, the session is getting wiped out when it is forwarded under
exactly
the wrong circumstances. The stack overflow is because you are recursively
forwarding: sessiontest2 forwards to sessiontest which then forwards to
sessiontest2 again. If all goes well this is fine, but because of a bug in
Tomcat
the recursion never terminates.

I've fixed this, it should go into the upcoming 3.2.2release. Stay tuned.

Out of curiosity, are the recursive forwards really necessary? Can't
you just put the code from sessiontest into a normal class file? It
would be safer and cleaner.

Kief


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to