File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session timeout problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session timeout problem" Watch "session timeout problem" New topic

session timeout problem

vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 219
Hi ,

I am having this code in web.xml file.

I set the session time out 50 minutes.But it is not working. After 10 or 20 minutes the session is expiring.

What might me the problem?

Thanks in Advance,
Vipul Reddy Bondugula.

Vipul Kumar
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
How are you determining that the session has timed out?

What is the client browser doing during this time?

Abhishek Ralhan
Ranch Hand

Joined: Aug 01, 2010
Posts: 40

can you please explain what is the whole flow from request to response(before which session times out)?
what is the error message you are getting on console/logs??
are you making a database call, if yes, what is its time-out?

I came to this world on a Learner's License
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 219
Thanks For Reply,

Williams: "How are you determining that the session has timed out? "
Iam getting NullPointerException 500.In web.xml i configured a servlet "ErrorHandler" which is invoked when any 500 exception occurs.
In that servlet ,iam also checking the session. I'm puttin the code here.

In ErrorHandler, i got the session object. I already had the empcode in the session.
In the code iam checking whether the session attribute exists or not..if doesnot exist then session is timed out and shows the expiry message..

After relogin application is working properly..

if i don't click on any link or just sit idle for 10 to 15 min's session is expired.
Any one having any solution please help me...

Thanks & Regards,
Vipul Reddy.

I agree. Here's the link:
subject: session timeout problem
jQuery in Action, 3rd edition