hi Kevin
I totally agree with you...but let me clarify this a little.
There are 3 servlets in a sequence, S1 calls S2 and S2 calls S3.
S1 does:
HttpSession session = req.getSession(true);
session.setValue("x", objectx);
S2 and S3 do
HttpSession session = req.getSession(false);
session.getValue("x");
Ok, so lets say i am the user. I open S1 in one browser-B1(Netscape 4.76)-
and then I open another browser-B2(still Netscape 4.76)- and open S1 in it I
am assigned the same session. So, now if I go to the
B1 and call S2 i get "x" that I set in B2.
What I thought I should do ( and here I maybe wrong) is everytime a user
access S1, a new session should be created? What do you suggest?
manav.
>From: Kevin Mukhar <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: new HttpSession
>Date: Tue, 1 May 2001 15:50:28 -0600
>
>manav agarwal wrote:
> >
> > How can i make sure that :
> >
> > a particular servlet always returns a new session instead of checking to
>see
> > if there is a session associated with this request.
>
>Can you provide more clarification on what you are trying to accomplish?
>The session is designed to exist from request to request and persist
>information between requests. From what you are describing, you are
>trying to use the session in a way that is contrary to its intended
>purpose. This generally indicates a poor design or implementation.
>
>In any case, if you really want to force a new session for EVERY
>request, just invalidate the session before returning the response to
>the client.
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html