----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


You're misreading the doc on this method, which is:

Returns the current HttpSession associated with this request or, if
necessary, creates a new session for the request. Use true for create to
create a new session, or false to return the current HttpSession.

So, getSession( true ) is always supposed to return the current session if
one exists -- it only creates a new session if the client does not have a
session.

- Fernando




                                                                                       
                                                        
                                                                                       
                                                        
                                                                                       
                                                        



----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

There is a problem in Tomcat with the HttpServletRequest method

     request.getSession(true)

The "true" parameter should force it to get a new session, according to
the javadoc page distributed by Sun with jsdk2.1.  However, if a session
already exists, then that one will be returned rather than a new one.

I have been able to get around the problem with these lines:

     session = request.getSession();
     session.invalidate();
     session = request.getSession(true);

but it looks to me like a bug.

(I am running Tomcat 3.1 with Apache 1.3.14 and Java 1.3 on Red Hat Linux
6.2.)
                   Graham


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]







--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to