Advertisement

01.26.2006 at 07:05AM PST, ID: 21711242
[x]
Attachment Details

Tomcat--session does not expire

Asked by tyamauch in Application Servers

Tags: tomcat, session, expire

Hello All,

This is the first time for me to ask a question to all of experts.
And I may be almost beginner of development of web application.
I would be grateful for your support.

Anyway, Following is my problem.

--session sometimes does not expire, that is, sometimes sessionDestroyed
does not appear on the tomcat log.

-My environment:
Tomcat 5.0.28
Apache 2.0.52
RedHat Linux Enterprise 4 update2
jdk1_5_0_05
CPU:Pentium4 3.4GHz
Memory:2G

-What I did
1.Open web browser and log-in to our web application.
2.Close web browser by clicking "x"button
3.Watch tomcat log to see session expires or not
(check whether sessionDestroyed appear or not).


-Result1
At first, I set session-timeout in web.xml to "1".
And web.xml exists under "conf" directory.
After about 1-2 minutes, session should expire. But
sometimes(1 out of 10 trial) it didn't expire.

-Result2
After Result1, I browse Experts Exchange to find a solution.
Then someone tried to use session.setMaxInactiveInterval()
instead of session-timeout and it seems he solved the problem by doing so.
So I tried to do the same thing. That is, I commented out the part of
session-timeout in web.xml and insert session.setMaxInactiveInterval(60)
into the place where session is created. But the result was same as Result1.

Now I have no idea...


So my question is as follows.
1. Please tell me any idea to solve the problem.
2. Is there any relations between above phenomenon and the specification of CPU or memory?
3. Is there any reletions between above phenomenon and the specification of NIC?



Start Free Trial
[+][-]02.01.2006 at 08:25AM PST, ID: 15844844

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.02.2006 at 03:03PM PST, ID: 15858294

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.13.2006 at 02:34AM PST, ID: 15939913

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.13.2006 at 06:15AM PST, ID: 15941404

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2006 at 01:33PM PST, ID: 16138732

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.12.2006 at 05:26AM PST, ID: 16167261

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Application Servers
Tags: tomcat, session, expire
Sign Up Now!
Solution Provided By: DarthMod
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32