tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Len Popp <>
Subject Re: request.getSession(false) incorrectly creates a session
Date Tue, 15 Nov 2005 04:15:35 GMT
I have observed that request.getSession(false) returns null when it's
called from the top of my servlet in the first request from a client,
but when the servlet forwards the request to a JSP page (via
RequestDispatcher.forward) the session gets created. The session is
not explicitly created by anything in the JSP page but something is
doing it. That's as far as I've got - I haven't dug into the Tomcat

On 11/14/05, Andy <> wrote:
> Hi,
> When I deploy my web app and call request.getSession(false), according to
> the
> javadoc, if a session does not exist null is returned. However I'm getting
> an
> object returned when I have not created a session myself.
> The object is an instance of this class -
> org.apache.catalina.session.StandardSessionFacade
> As a result my unit tests, using mock objects, all work fine, but when I
> deploy my  application it breaks because a session is created incorrectly,
> it seems to me.
> I'm using Tomcat 5.5. Anybody care to enlighten me?
> Thanks,
> Andy.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message