session = request.getSession(false);

should work for you. If you specify getSession(true) it will create a new
session object everytime.
Regards,
Milind




                    May Charles N
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]
                    M>                       cc:
                    Sent by: A               Subject:     Session Tracking fails -- 
always obtaining NEW session?
                    mailing list for
                    Enterprise
                    JavaBeans
                    development
                    <EJB-INTEREST@JAV
                    A.SUN.COM>


                    09/24/2002 01:58
                    AM
                    Please respond to
                    May Charles N






I would like to be able to save a Stateful Session Bean Handle in an
HttpSession.
Every time my HttpServlet code (executing in the Websphere 3.5.3 Test
Environment) hits the line:
        session = request.getSession(true);
it obtains a NEW session rather than an existing one, even if previous
requests have hit the same servlet in the same test.


I've tried this with raw code as a test client and it fails; then I tried
making a JApplet client and running it in AppletViewer and get the same
result. Is it impossible to test session tracking in the test environment?
What am I missing?


Charles May
Software Engineer
Technology Delivery Department (TDD)
Mellon Financial Corporation
Pittsburgh, PA






*****************************************************************
DISCLAIMER:   The information contained in this e-mail may be confidential
and is intended solely for the use of the named addressee.  Access, copying
or re-use of the e-mail or any information contained therein by any other
person is not authorized.  If you are not the intended recipient please
notify us immediately by returning the e-mail to the originator.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to