Cookies are turned on and I see the jsessionid in the url. I have even deleted the cookie and tried a refresh of the page. It recreates the cookie but I still get the same null pointer exception. The only way I have been able to get around the problem is to do a reload. I am running Tomcat 5.0. I have tried two different machines with the same results. Both are running Windows XP. I have even coded all the jsp pages to go back to the jsp that has the directive page session="true" and where it sets the attributes. Still no success.
-----Original Message----- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 12:46 PM To: Tomcat Users List Subject: Re: Sessions in Tomcat * PGP Signed by an unknown key: 08/01/2006 at 12:46:13 PM Donald, > The first browser session works fine and I can > navigate thru all my pages without a problem. A few minutes later I > open another browser window and I immediately get a null pointer > exception. Is it possible that you are have cookies turned off and are having the JSP encode the jsessionid into each URL? If that's the case, you might be simply typing a URL into your second browser window that doesn't have this magic parameter, and therefore not getting a session. > [After a restart, ] both browser sessions bring to work normally, the > original browser continues as if nothing happened and the second > browser session loads without the null pointer exception. No, that's just plain weird. > Is there something I am not setting? > Even more bizarre, after I do a reload of the website if I open two > browser windows very quickly they both succeed. When I let a browser > window sit with no activity for more than two or three minutes and I > click to a link to navigate thru my jsp pages I immediately get a null > pointer exception anywhere I am accessing the one of the session > objects. Hmm... perhaps your browser is configured to prohibit cookie life longer than a couple of minutes??? Seems far-fetched, but you've got a weird problem. How are you getting your session? Can you post a bit of code? It would be particularly useful to see the code you use to create the session, to get the attributes (as well as verify that the session exists), and then the place where the NPE is being thrown. -chris * Unknown Key * 0xF2EFD0F0 -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]