Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP & TOMCAT SERVER - Session expires/lose connection to db - what's wrong?

843838Sep 26 2006 — edited Sep 29 2006
I'm using Tomcat server version 4.1 and just recently I have been experiencing a problem.

My jsp pages make connections to a mysql db through the use of a javabean. I retreive data and display it. The pages are part of a session.

In my web.xml file the <session-timeout> param is set to 10 mins. Which means the session expires as a result of 10 mins of inactivity.

The Problem:
After making a few requests from page to page, after only a few mins, I make a request for a page and the status bar showing the process slows and delays, the page won't connect to the db, the session appears to have timed out on its own. I never reach 10 mins of time. Whereas my pages usually snap to display, I now get quite a delay and the page doesn't display what is should.

The only way to get the session restarted is to shutdown and restart the server.
--------------------------------------------------------------------------------------------------
I've been programming with this server for at least a year, and haven't run into this problem until just recently, so I haven't a clue why its doing this now.

The majority of my pages have this :
if(session.isNew( )) {
   //reset needed session attribute
}
This is the only way to test if a session has expired through the use of the isNew() method, right?? I looked at the documentation.

What could be wrong?? How do I get around this??
Any input is appreciated,
-Love2Java
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2006
Added on Sep 26 2006
8 comments
2,006 views