Anil
Just on top of normal session validation, add 1 session attribute in
servlet1 to indicate that this session is valid+ and remove this attribute
in servlet2. So, after leaving serlvet2, the session is valid everywhere
except servlet2.
Kenneth Kwan
-----Original Message-----
From: anil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 11:04 AM
To: [EMAIL PROTECTED]
Subject: Re: ===>Session Question<===
Thanks for the idea Alin. But that will invalidate all the
attributes in the
session. I want to keep some. And some to keep only in the request
context (what
ever you call).
request.getSession(true) -> this will create new session if you do
not have a
session. I am not sure what will happen with
request.getSession(false) if you already have a session, I guess you
can't
access any session variables in that servlet because it is kind of
ignoring the
session. (I am not an expert on this).
anil
Alin Simionoiu wrote:
> I was thinking at something more simple then this.
> When you pass an object between servlet1 and servlet2, you pass
also the
> request object ( HttpServletRequest..)
> So, in servlet2 you can do HttpSession session =
> request.getSession(false);....right?.. ( where request is the
request object
> passed by servlet1)..
> After you serve you're client you can simple do a :
session.invalidate();
> and you're session that was passed from Servlet1 is no more a
valid one.
>
> Alin