tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Newman" <sam.new...@www.stamplets.com>
Subject Re: Problem with session tracking
Date Tue, 24 Apr 2001 11:33:07 GMT
Hmm.....
I guess its because your forwarding the context wholesale. I'd guess the
sesion is new within that given context, and because your effectively
recreating the context when you forward in that manner, it still counts as
new. I use sendRedirect  instead and this works fine - what do you loose my
using sendRedirect rather than forwarding?

sam
----- Original Message -----
From: <gouldina@netscape.net>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, April 24, 2001 11:21 AM
Subject: Re: Problem with session tracking


> Sam wrote:
>
> >
> > There is a difference between the way HttpSessions arew created and
handled,
> > and the Cookie objetc. The cookie object creates a persistant cookie on
the
> > clients machine. The HttpSession is just a memory cookie, and as such is
> > non-persistant and doesn't sit on disk.
>
> Interesting. Would you expect to see the session cookie when you call the
getCookies() method then or not?
>
> Since my last mail, I've made some progress and can get isNew() to return
false if I comment out the last few lines of the servlet method which
forward to a jsp page:
>
> ServletContext servletContext = getServletConfig().getServletContext();
> RequestDispatcher requestDispatcher =
servletContext.getRequestDispatcher("/myapp/jsp/hello.jsp");
> requestDispatcher.forward(request, response);
>
> Why would this screw up my session?
>
>
>
>
>
> __________________________________________________________________
> Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/
>


Mime
View raw message